Alexander Korotkov 165d921c9a 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
2024-02-08 12:45:26 +02:00
..
2024-01-29 12:08:57 -06:00
2024-01-03 20:49:05 -05:00
2024-02-08 10:07:26 +07:00
2024-01-03 20:49:05 -05:00
2024-01-03 20:49:05 -05:00
2023-11-06 15:18:04 +01:00
2024-01-03 20:49:05 -05:00
2023-11-06 15:18:04 +01:00