forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd44060c
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 parent3ba1793 commitd44060c
1 file changed
+21
-10
lines changedLines changed: 21 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
| 119 | + | |
119 | 120 |
| |
120 | 121 |
| |
121 | 122 |
| |
| 123 | + | |
| 124 | + | |
122 | 125 |
| |
| 126 | + | |
123 | 127 |
| |
124 | 128 |
| |
125 | 129 |
| |
| |||
151 | 155 |
| |
152 | 156 |
| |
153 | 157 |
| |
154 |
| - | |
155 |
| - | |
156 |
| - | |
157 |
| - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
158 | 163 |
| |
159 |
| - | |
160 |
| - | |
161 |
| - | |
162 |
| - | |
163 |
| - | |
164 |
| - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
165 | 176 |
| |
166 | 177 |
| |
167 | 178 |
| |
|
0 commit comments
Comments
(0)