Keep shared-memory copy of ThisTimeLineID in sync at all times.
authorRobert Haas <rhaas@postgresql.org>
Wed, 27 Oct 2021 16:56:34 +0000 (12:56 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 28 Oct 2021 18:55:18 +0000 (14:55 -0400)
commitf06ced35cd9efd54056516f03b3680976dfa74bd
treede2170b86e7e7809ce991f2c783ed903fb513e74
parent7f580aa5d88a9b03d66fcb9a1d7c4fcd69d9e126
Keep shared-memory copy of ThisTimeLineID in sync at all times.

Previously, the startup process set the global variable ThisTimeLineID
for each record replayed, while leaving the corresponding shared-memory
variable uninitialized. Now, XLogCtl->ThisTimeLineID is always
the same as ThisTimeLineID, and XLogCtl->PrevTimeLineID is also
the same unless a promotion has occurred since server startup.
src/backend/access/transam/xlog.c