Re: New vacuum option to do only freezing
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, "Bossart, Nathan" <bossartn@amazon.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-03-28T05:56:10Z
Lists: pgsql-hackers
On Wed, Mar 27, 2019 at 12:12 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > On Sat, Mar 23, 2019 at 3:25 AM Robert Haas <robertmhaas@gmail.com> wrote: > > > > On Fri, Mar 8, 2019 at 12:14 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > > IIUC we've discussed the field-and-value style vacuum option. I > > > suggested that since we have already the disable_page_skipping option > > > the disable_page_skipping option would be more natural style and > > > consistent. I think "VACUUM (INDEX_CLEANUP false)" seems consistent > > > with its reloption but not with other vacuum options. So why does only > > > this option (and probably up-coming new options) need to support new > > > style? Do we need the same change to the existing options? > > > > Well, it's too late to change to change DISABLE_PAGE_SKIPPING to work > > some other way; it's been released, and we're stuck with it at this > > point. > > Agreed. > > > However, I generally believe that it is preferable to phrase > > options positively then negatively, so that for example one writes > > EXPLAIN (ANALYZE, TIMING OFF) not EXPLAIN (ANALYZE, NO_TIMING). So > > I'd like to do it that way for the new options that we're proposing to > > add. > > Agreed with using phrase options positively than negatively. Since > DISABLE_PAGE_SKIPPING is an option for emergency we might be able to > rename for consistency in a future release. > > Attached updated version patches. The patch adds the basic functionality to disable index cleanup but one possible argument could be whether we should always disable it when anti-wraparound vacuum. As discussed on another thread[1] anti-wraparound vacuum still could lead the I/O burst problem and take a long time, especially for append-only large table. Originally the purpose of this feature is to resolve the problem that vacuum takes a long time even if the table has just a few dead tuples, which is a quite common situation of anti-wraparound vacuum. It might be too late to discuss but if we always disable it when anti-wraparound vacuum then users don't need to do "VACUUM (INDEX_CLEANUP false)" manually on PostgreSQL 12. Dose anyone have opinions? [1] https://www.postgresql.org/message-id/CAC8Q8t%2Bj36G_bLF%3D%2B0iMo6jGNWnLnWb1tujXuJr-%2Bx8ZCCTqoQ%40mail.gmail.com Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
Commits
-
Add toast-level reloption for vacuum_index_cleanup
- ce59b75d449d 12.0 landed
-
heap_prepare_freeze_tuple: Simplify coding
- 2bf372a4ae26 12.0 landed
-
Fix missing word.
- 6665305e17ed 12.0 landed
-
Allow VACUUM to be run with index cleanup disabled.
- a96c41feec6b 12.0 landed
-
Don't mark pages all-visible spuriously
- d2599ecfcc74 11.0 cited