aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistget.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2021-10-29 14:00:32 -0400
committerRobert Haas <rhaas@postgresql.org>2021-10-29 14:00:32 -0400
commit2f5c4397c39dea49c5608ba583868e26d767fc32 (patch)
tree504ee9b5c8d870da2d8a68e6e3004d7f431a9692 /src/backend/access/gist/gistget.c
parent5f55fc5a346e1ab54f3d756e368d276b95be8c4a (diff)
downloadpostgresql-2f5c4397c39dea49c5608ba583868e26d767fc32.tar.gz
postgresql-2f5c4397c39dea49c5608ba583868e26d767fc32.zip
When fetching WAL for a basebackup, report errors with a sensible TLI.
The previous code used ThisTimeLineID, which need not even be initialized here, although it usually was in practice, because pg_basebackup issues IDENTIFY_SYSTEM before calling BASE_BACKUP, and that initializes ThisTimeLineID as a side effect. That's not really good enough, though, not only because we shoudn't be counting on side effects like that, but also because the TLI could change meanwhile. Fortunately, we have convenient access to more meaningful TLI values, so use those instead. Because of the way this logic is coded, the consequences of using a possibly-incorrect TLI here are no worse than a slightly confusing error message, I don't want to take any risk here, so no back-patch at least for now. Patch by me, reviewed by Kyotaro Horiguchi and Michael Paquier Discussion: http://postgr.es/m/CA+TgmoZRNWGWYDX9RgTXMG6_nwSdB=PB-PPRUbvMUTGfmL2sHQ@mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gistget.c')
0 files changed, 0 insertions, 0 deletions