Re: removing global variable ThisTimeLineID

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-11-05T13:49:44Z
Lists: pgsql-hackers
I looked at these in a very quick skim.  I agree that this is a
good step in a good direction.

I 'git rebase -x'd this series in order to compile and run the tests on
each patch individually.  There are no compiler warnings anywhere and no
test failures.


-- 
Álvaro Herrera              Valdivia, Chile  —  https://www.EnterpriseDB.com/
"La victoria es para quien se atreve a estar solo"



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.