VACUUM (DISABLE_PAGE_SKIPPING on)

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: VACUUM (DISABLE_PAGE_SKIPPING on)
Date: 2020-11-16 20:52:31
Message-ID: CANP8+jJUeRHN0QiKTQptMs_+ZxRx2nbLiM2yT9Gi2pmy-oVovg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The docs are misleading for this feature, since they say:
"This option disables all page-skipping behavior, and is
intended to be used only when the contents of the visibility map are
suspect, which should happen only if there is a hardware or software
issue causing database corruption."

The docs do correctly say "Pages where all tuples are known to be
frozen can always be skipped". Checking the code, lazy_scan_heap()
comments say
"we can still skip pages that are all-frozen, since such pages do not
need freezing".

The code is quite clear: DISABLE_PAGE_SKIPPING makes the vacuum into
an aggressive vacuum. Line 487, heap_vacuum_rel(). Aggressive vacuums
can still skip a page that is frozen, and rely on the visibility map
for that information.

So the docs are wrong - we don't disable *all* page-skipping and it is
not appropriate to warn users away from this feature by saying "is
intended to be used only when the contents of the visibility map are
suspect".

Reworded docs patch attached.

--
Simon Riggs http://www.EnterpriseDB.com/

Attachment Content-Type Size
aggressive_rewording.v1.patch application/octet-stream 1.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2020-11-16 20:55:16 Re: [PATCH] remove deprecated v8.2 containment operators
Previous Message Alvaro Herrera 2020-11-16 20:35:54 Re: remove spurious CREATE INDEX CONCURRENTLY wait