walsender.c: Eliminate remaining uses of ThisTimeLineID.
authorRobert Haas <rhaas@postgresql.org>
Thu, 28 Oct 2021 17:14:24 +0000 (13:14 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 29 Oct 2021 17:38:50 +0000 (13:38 -0400)
commit4b04a9fed33986bc71de25d3f4ca772b12bf0007
tree62cb6b4b9cbd76442574823a8be289581e6c4bc2
parentd2ead068577ade165366393d101c74fe6074a1f9
walsender.c: Eliminate remaining uses of ThisTimeLineID.

IdentifySystem and StartReplication needs to know the current time
line ID, but it does not need to store the value into a global
variable, so don't do that.

logical_read_xlog_page is already relying on the timeline ID not
changing currently, so eliminat the use of the global variable
here, but also add some comments about the potential hazard if we
ever allow logical decoding on standbys.

To make all this work, GetStandbyFlushRecPtr now returns the TLI
via an out parameter.
src/backend/replication/walsender.c