Re: removing global variable ThisTimeLineID

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-11-05T16:58:04Z
Lists: pgsql-hackers
On Fri, Nov 5, 2021 at 9:49 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> I looked at these in a very quick skim.  I agree that this is a
> good step in a good direction.

Cool. I have now committed these. I grouped them into just 3 commits
rather than having 11 separate commits as I did in my earlier posting,
but the content is the same.

> 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.

Thanks for checking. It's hard to tell whether the stuff that works on
my machine will work everywhere, unless someone tests it.

-- 
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.