Re: removing global variable ThisTimeLineID

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-11-10T14:52:06Z
Lists: pgsql-hackers
On Tue, Nov 9, 2021 at 7:41 PM Michael Paquier <michael@paquier.xyz> wrote:
> On Tue, Nov 09, 2021 at 02:15:51PM -0500, Robert Haas wrote:
> > That's a good point. However, since I think newTLI is already in use
> > in some of the functions StartupXLOG() calls, and since I think it
> > would be good to use the same name in StartupXLOG() as in the
> > functions that it calls, what I'd prefer to do is rename the newTLI
> > variable in the inner scope to newReplayTLI, as in the attached v2.
>
> WFM.  Thanks.

Cool. Committed that way.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



Commits

  1. More cleanup of 'ThisTimeLineID'.

  2. Change ThisTimeLineID from a global variable to a local variable.

  3. Remove all use of ThisTimeLineID global variable outside of xlog.c

  4. Don't set ThisTimeLineID when there's no reason to do so.

  5. When fetching WAL for a basebackup, report errors with a sensible TLI.

  6. Remove useless code from CreateReplicationSlot.