Skip to content

Commit 5698f07

Browse files
Doc: update VACUUM FREEZE query conflict guidance.
Commit 1de58df, which added page-level freezing, taught VACUUM to reuse each page's "set-visibility-map" snapshotConflictHorizon for freezing (at least in the vast majority of cases where freezing went ahead). This made VACUUM FREEZE much less prone to generating recovery conflicts on standbys; VACUUM FREEZE became only slightly more likely to cause recovery conflicts than an equivalent VACUUM. Update old documentation that specifically warned of the likelihood of recovery conflicts from VACUUM FREEZE. Explain the same general issue (the issue of VACUUM generating recovery conflicts even in the absence of dead row cleanup) using the example of conflicts caused by VISIBLE WAL records.
1 parent f7faa99 commit 5698f07

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

doc/src/sgml/high-availability.sgml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,10 +1873,16 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)'
18731873
</para>
18741874

18751875
<para>
1876-
Experienced users should note that both row version cleanup and row version
1877-
freezing will potentially conflict with standby queries. Running a manual
1878-
<command>VACUUM FREEZE</command> is likely to cause conflicts even on tables with
1879-
no updated or deleted rows.
1876+
Row version cleanup isn't the only potential cause of conflicts with
1877+
standby queries. All index-only scans (including those that run on
1878+
standbys) must use an <acronym>MVCC</acronym> snapshot that
1879+
<quote>agrees</quote> with the visibility map. Conflicts are therefore
1880+
required whenever <command>VACUUM</command> <link
1881+
linkend="vacuum-for-visibility-map">sets a page as all-visible in the
1882+
visibility map</link> containing one or more rows
1883+
<emphasis>not</emphasis> visible to all standby queries. So even running
1884+
<command>VACUUM</command> against a table with no updated or deleted rows
1885+
requiring cleanup might lead to conflicts.
18801886
</para>
18811887

18821888
<para>

0 commit comments

Comments
 (0)