Re: New vacuum option to do only freezing

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Masahiko Sawada <sawada.mshk@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-04-03T15:55:00Z
Lists: pgsql-hackers
On Wed, Apr 3, 2019 at 1:32 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> Attached the updated version patches including the
> DISABLE_PAGE_SKIPPING part (0003).

I am confused about nleft_dead_tuples.  It looks like it gets
incremented whenever we set tupgone = true, regardless of whether we
are doing index cleanup.  But if we ARE doing index cleanup then the
dead tuple will not be left.  And if we are not doing index vacuum
then we still don't need this for anything, because tups_vacuumed is
counting the same thing.  I may be confused.  But if I'm not, then I
think this should just be ripped out, and we should only keep
nleft_dead_itemids.

As far as VacOptTernaryValue, I think it would be safer to change this
so that VACOPT_TERNARY_DEFAULT = 0.  That way palloc0 will fill in the
value that people are likely to want by default, which makes it less
likely that people will accidentally write future code that doesn't
clean up indexes.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Commits

  1. Add toast-level reloption for vacuum_index_cleanup

  2. heap_prepare_freeze_tuple: Simplify coding

  3. Fix missing word.

  4. Allow VACUUM to be run with index cleanup disabled.

  5. Don't mark pages all-visible spuriously