- Notifications
You must be signed in to change notification settings - Fork5
Commita34c3dd
committed
Avoid consuming an XID during vac_truncate_clog().
vac_truncate_clog() uses its own transaction ID as the comparison point ina sanity check that no database's datfrozenxid has already wrapped around"into the future". That was probably fine when written, but in a lazyvacuum we won't have assigned an XID, so calling GetCurrentTransactionId()causes an XID to be assigned when otherwise one would not be. Most of thetime that's not a big problem ... but if we are hard up against thewraparound limit, consuming XIDs during antiwraparound vacuums is a verybad thing.Instead, use ReadNewTransactionId(), which not only avoids this problembut is in itself a better comparison point to test whether wraparoundhas already occurred.Report and patch by Alexander Korotkov. Back-patch to all versions.Report: <CAPpHfdspOkmiQsxh-UZw2chM6dRMwXAJGEmmbmqYR=yvM7-s6A@mail.gmail.com>1 parente504d91 commita34c3dd
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1050 | 1050 |
| |
1051 | 1051 |
| |
1052 | 1052 |
| |
1053 |
| - | |
| 1053 | + | |
1054 | 1054 |
| |
1055 | 1055 |
| |
1056 | 1056 |
| |
| |||
1099 | 1099 |
| |
1100 | 1100 |
| |
1101 | 1101 |
| |
1102 |
| - | |
| 1102 | + | |
1103 | 1103 |
| |
1104 | 1104 |
| |
1105 | 1105 |
| |
|
0 commit comments
Comments
(0)