forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit165d921
committed
Fix wrong logic in TransactionIdInRecentPast()
The TransactionIdInRecentPast() should return false for all the transactionsolder than TransamVariables->oldestClogXid. However, the function containsa bug in comparison FullTransactionId to TransactionID allowing fulltransactions between nextXid - 2^32 and oldestClogXid - 2^31.This commit fixes TransactionIdInRecentPast() by turning the oldestClogXid intoFullTransactionId first, then performing the comparison.Backpatch to all supported versions.Reported-by: Egor ChindyaskinBug: 18212Discussion:https://postgr.es/m/18212-547307f8adf57262%40postgresql.orgAuthor: Karina LitskevichReviewed-by: Kyotaro HoriguchiBackpatch-through: 121 parent5869aef commit165d921
1 file changed
+19
-11
lines changedLines changed: 19 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
101 |
| - | |
102 | 101 |
| |
103 | 102 |
| |
104 | 103 |
| |
105 | 104 |
| |
| 105 | + | |
| 106 | + | |
106 | 107 |
| |
107 | 108 |
| |
108 | 109 |
| |
| |||
135 | 136 |
| |
136 | 137 |
| |
137 | 138 |
| |
138 |
| - | |
139 |
| - | |
140 |
| - | |
141 |
| - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
142 | 144 |
| |
143 |
| - | |
144 |
| - | |
145 |
| - | |
146 |
| - | |
147 |
| - | |
148 |
| - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
149 | 157 |
| |
150 | 158 |
| |
151 | 159 |
| |
|
0 commit comments
Comments
(0)