- Notifications
You must be signed in to change notification settings - Fork28
Commitd798ea7
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 parente8e3e67 commitd798ea7
2 files changed
+3
-2
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1777 | 1777 |
| |
1778 | 1778 |
| |
1779 | 1779 |
| |
1780 |
| - | |
| 1780 | + | |
| 1781 | + | |
1781 | 1782 |
| |
1782 | 1783 |
| |
1783 | 1784 |
| |
|
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)