On Fri, Oct 29, 2021 at 7:28 AM Michael Paquier <michael@paquier.xyz> wrote:
> Yes, I agree that it is a good idea to cut the dependency of those
> code paths with ThisTimeLineID, expecting IDENTIFY_SYSTEM to have done
> the job beforehand. One argument in favor of your change, though I'd
> like to think that nobody does so, is that users could run BASE_BACKUP
> with a replication connection. So no need to hack pg_basebackup to be
> able to finish with a WAL sender that has no TLI set in the backend.
Right. I mean, I think the current behavior is both unprincipled and
unintentional. It's not like somebody would have intentionally
designed the BASE_BACKUP command to rely on a global variable
happening to have been set by a previous command. And if for some
crazy reason they had done that, surely there would be some comments
or something talking about it. It's just a (minor) mistake.
> Your patch seems correct to me.
Thanks, committed.
--
Robert Haas
EDB: http://www.enterprisedb.com