forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9f3e4c8
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 parentde52198 commit9f3e4c8
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1002 | 1002 |
| |
1003 | 1003 |
| |
1004 | 1004 |
| |
1005 |
| - | |
| 1005 | + | |
1006 | 1006 |
| |
1007 | 1007 |
| |
1008 | 1008 |
| |
| |||
1051 | 1051 |
| |
1052 | 1052 |
| |
1053 | 1053 |
| |
1054 |
| - | |
| 1054 | + | |
1055 | 1055 |
| |
1056 | 1056 |
| |
1057 | 1057 |
| |
|
0 commit comments
Comments
(0)