aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/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:42 +0200
commit18388291aab8038b6abb6a9109ab6763e7a5b630 (patch)
treef6caa04fd4d6fe0274d954ad610872127de18079 /src/interfaces/ecpg/ecpglib/misc.c
parentd1a2a93766b0a27eb4ffecdb63ed3879088dbfbe (diff)
downloadpostgresql-18388291aab8038b6abb6a9109ab6763e7a5b630.tar.gz
postgresql-18388291aab8038b6abb6a9109ab6763e7a5b630.zip
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/ecpg/ecpglib/misc.c')
0 files changed, 0 insertions, 0 deletions