diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2024-02-08 12:45:26 +0200 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2024-02-08 12:45:26 +0200 |
commit | 165d921c9a883814a35e8161fc692793e9c945a4 (patch) | |
tree | 1187aaa43f68c0c2600dbfea728d0cc422945a78 /src/backend/commands/dbcommands.c | |
parent | 5869aef9a15d5dc0b4de3d63d1ae360a6f34afb4 (diff) | |
download | postgresql-165d921c9a883814a35e8161fc692793e9c945a4.tar.gz postgresql-165d921c9a883814a35e8161fc692793e9c945a4.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/backend/commands/dbcommands.c')
0 files changed, 0 insertions, 0 deletions