Re: New vacuum option to do only freezing

Nathan Bossart <bossartn@amazon.com>

From: "Bossart, Nathan" <bossartn@amazon.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2019-02-04T21:22:38Z
Lists: pgsql-hackers
On 2/3/19, 1:48 PM, "Masahiko Sawada" <sawada.mshk@gmail.com> wrote:
> On Sat, Feb 2, 2019 at 7:00 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>>
>> On 2019-Feb-01, Bossart, Nathan wrote:
>>
>> > IMHO we could document this feature at a slightly higher level without
>> > leaving out any really important user-facing behavior.  Here's a quick
>> > attempt to show what I am thinking:
>> >
>> >         With this option, VACUUM skips all index cleanup behavior and
>> >         only marks tuples as "dead" without reclaiming the storage.
>> >         While this can help reclaim transaction IDs faster to avoid
>> >         transaction ID wraparound (see Section 24.1.5), it will not
>> >         reduce bloat.
>>
>> Hmm ... don't we compact out the storage for dead tuples?  If we do (and
>> I think we should) then this wording is not entirely correct.
>
> Yeah, we remove tuple and leave the dead ItemId. So we actually
> reclaim the almost tuple storage.

Ah, yes.  I was wrong here.  Thank you for clarifying.

> Attached the updated patch and the patch for vacuumdb.

Thanks!  I am hoping to take a deeper look at this patch in the next
couple of days.

Nathan

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