forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7da8341
committed
Revive "snapshot too old" with wal_level=minimal and SET TABLESPACE.
Given a permanent relation rewritten in the current transaction, theold_snapshot_threshold mechanism assumed the relation had never beensubject to early pruning. Hence, a query could fail to report "snapshottoo old" when the rewrite followed an early truncation. ALTER TABLE SETTABLESPACE is probably the only rewrite mechanism capable of exposingthis bug. REINDEX sets indcheckxmin, avoiding the problem. CLUSTER haszeroed page LSNs since before old_snapshot_threshold existed, soold_snapshot_threshold has never cooperated with it. ALTER TABLE... SET DATA TYPE makes the table look empty to every past snapshot,which is strictly worse. Back-patch to v13, where commitc6b9204 broke this.Kyotaro Horiguchi and Noah MischDiscussion:https://postgr.es/m/20210113.160705.2225256954956139776.horikyota.ntt@gmail.com1 parent360bd23 commit7da8341
2 files changed
+6
-2
lines changedLines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1764 | 1764 |
| |
1765 | 1765 |
| |
1766 | 1766 |
| |
1767 |
| - | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
1768 | 1772 |
| |
1769 | 1773 |
| |
1770 | 1774 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
|
0 commit comments
Comments
(0)