File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -2091,6 +2091,15 @@ include_dir 'conf.d'
2091
2091
transaction ID wraparound may occur in much shorter time frames.
2092
2092
</para>
2093
2093
2094
+ <para>
2095
+ When this feature is enabled, freed space at the end of a relation
2096
+ cannot be released to the operating system, since that could remove
2097
+ information needed to detect the <literal>snapshot too old</>
2098
+ condition. All space allocated to a relation remains associated with
2099
+ that relation for reuse only within that relation unless explicitly
2100
+ freed (for example, with <command>VACUUM FULL</>).
2101
+ </para>
2102
+
2094
2103
<para>
2095
2104
This setting does not attempt to guarantee that an error will be
2096
2105
generated under any particular circumstances. In fact, if the
Original file line number Diff line number Diff line change @@ -1663,6 +1663,15 @@ lazy_cleanup_index(Relation indrel,
1663
1663
* Don't even think about it unless we have a shot at releasing a goodly
1664
1664
* number of pages. Otherwise, the time taken isn't worth it.
1665
1665
*
1666
+ * Also don't attempt it if we are doing early pruning/vacuuming, because a
1667
+ * scan which cannot find a truncated heap page cannot determine that the
1668
+ * snapshot is too old to read that page. We might be able to get away with
1669
+ * truncating all except one of the pages, setting its LSN to (at least) the
1670
+ * maximum of the truncated range if we also treated an index leaf tuple
1671
+ * pointing to a missing heap page as something to trigger the "snapshot too
1672
+ * old" error, but that seems fragile and seems like it deserves its own patch
1673
+ * if we consider it.
1674
+ *
1666
1675
* This is split out so that we can test whether truncation is going to be
1667
1676
* called for before we actually do it. If you change the logic here, be
1668
1677
* careful to depend only on fields that lazy_scan_heap updates on-the-fly.
You can’t perform that action at this time.
0 commit comments