diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2024-02-08 12:45:26 +0200 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2024-02-09 12:55:43 +0200 |
commit | d44060cfcc49d512da1ae9b1b846385748e46d04 (patch) | |
tree | a8567941691831b3687ecd2f18143238e34f9523 /src/interfaces/ecpg/ecpglib/misc.c | |
parent | 3ba17930941ea629b2ffb5cd252f3055d4d4a9a6 (diff) | |
download | postgresql-d44060cfcc49d512da1ae9b1b846385748e46d04.tar.gz postgresql-d44060cfcc49d512da1ae9b1b846385748e46d04.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