summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-misc.c
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2024-02-08 12:45:26 +0200
committerAlexander Korotkov <akorotkov@postgresql.org>2024-02-09 12:39:54 +0200
commit4efaf4b09e8f9a9c8b04a6c82454c248de042119 (patch)
treeb4963d6095afdcfd009a8601f5490812c97e8685 /src/interfaces/libpq/fe-misc.c
parentb3b2bf3b9cc1f31170d3b4e21cb6ac0cf24bf90a (diff)
Fix wrong logic in TransactionIdInRecentPast()
The TransactionIdInRecentPast() should return false for all the transactions older than TransamVariables->oldestClogXid. However, the function contains a bug in comparison FullTransactionId to TransactionID allowing full transactions between nextXid - 2^32 and oldestClogXid - 2^31. This commit fixes TransactionIdInRecentPast() by turning the oldestClogXid into FullTransactionId first, then performing the comparison. Backpatch to all supported versions. Reported-by: Egor Chindyaskin Bug: 18212 Discussion: https://postgr.es/m/18212-547307f8adf57262%40postgresql.org Author: Karina Litskevich Reviewed-by: Kyotaro Horiguchi Backpatch-through: 12
Diffstat (limited to 'src/interfaces/libpq/fe-misc.c')
0 files changed, 0 insertions, 0 deletions