Change ThisTimeLineID to be 'static' rather than 'extern'.
authorRobert Haas <rhaas@postgresql.org>
Fri, 29 Oct 2021 20:59:22 +0000 (16:59 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 29 Oct 2021 21:05:22 +0000 (17:05 -0400)
commitb467bc9b9eccd61f4c976abd243d0031a06012c0
treed7e01e7204ac008b02dff30604e585598c8f5232
parent3b05b248fa9c3b1f0d6b35bfe933ad96947d0300
Change ThisTimeLineID to be 'static' rather than 'extern'.

This means code outside xlog.c can no longer access it. Previous
commits have removed most cases whre that was needed, and this
commit cleans up the last few. In xlogfuncs.c, there are a couple
of places that use ThisTimeLineID to obtain the current timeline;
since the code can't run in recovery, use GetWALInsertionTimeLine()
instead. And, in xlogarchive.c, XLogArchiveNotifySeg() needs to
know the relevant timeline, so have the caller pass it as an
additional argument.
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogarchive.c
src/backend/access/transam/xlogfuncs.c
src/include/access/xlog.h
src/include/access/xlogarchive.h