aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2024-01-19 17:19:17 +0200
committerAlexander Korotkov <akorotkov@postgresql.org>2024-01-19 17:19:17 +0200
commitc64086b79dbad19e4ee0af8d19e835111aa87bd5 (patch)
tree621f143eca1edebcffc456a1f9c24e5786513d83 /src/backend/access/gist/gistutil.c
parent6db4598fcb82a87a683c4572707e522504830a2b (diff)
downloadpostgresql-c64086b79dbad19e4ee0af8d19e835111aa87bd5.tar.gz
postgresql-c64086b79dbad19e4ee0af8d19e835111aa87bd5.zip
Reorder actions in ProcArrayApplyRecoveryInfo()
Since 5a1dfde8334b, 2PC filenames use FullTransactionId. Thus, it needs to convert TransactionId to FullTransactionId in StandbyTransactionIdIsPrepared() using TransamVariables->nextXid. However, ProcArrayApplyRecoveryInfo() first releases locks with usage StandbyTransactionIdIsPrepared(), then advances TransamVariables->nextXid. This sequence of actions could cause errors. This commit makes ProcArrayApplyRecoveryInfo() advance TransamVariables->nextXid before releasing locks. Reported-by: Thomas Munro, Michael Paquier Discussion: https://postgr.es/m/CA%2BhUKGLj_ve1_pNAnxwYU9rDcv7GOhsYXJt7jMKSA%3D5-6ss-Cw%40mail.gmail.com Discussion: https://postgr.es/m/Zadp9f4E1MYvMJqe%40paquier.xyz
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions