From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: New vacuum option to do only freezing |
Date: | 2019-04-04 02:28:08 |
Message-ID: | CAD21AoDu0wHfBmgJSQdH4Yn1vJingqgdEQ4bUioJf8v=RQ9K=g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Apr 4, 2019 at 9:18 AM Kyotaro HORIGUCHI
<horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>
> Hello.
>
> At Wed, 3 Apr 2019 11:55:00 -0400, Robert Haas <robertmhaas(at)gmail(dot)com> wrote in <CA+Tgmoas581jpJ0TPaA38OhjXHgbLy8z1fuuHH7CaNkrboZJeA(at)mail(dot)gmail(dot)com>
> > On Wed, Apr 3, 2019 at 1:32 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)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.
>
> tups_vacuumed is including heap_page_prune()ed tuples, which
> aren't counted as "tupgone".
Yes. tup_vacuumed counts not only HOT pruned tuples but also tuples
that became dead after heap_page_prune(). When index clenaup is
disabled, the former leaves only itemid whereas the latter leaves
itemid and heap tuple as we don't remove. nleft_dead_tuples counts
only the latter to report precisely. I think nleft_dead_tuples should
be incremented only when index cleanup is disabled, and the that part
comment should be polished.
>
> > 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.
>
> It's convincing. My compalint was enabled=0 and disabled=1 is
> confusing so I'm fine with default=0, disabled=1, enabled=2.
Okay, fixed.
Attached the updated version patch.
Regards,
--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
v14-0001-Add-INDEX_CLEANUP-option-to-VACUUM-command.patch | application/octet-stream | 22.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2019-04-04 02:35:16 | Re: Inadequate executor locking of indexes |
Previous Message | Andres Freund | 2019-04-04 02:13:30 | Re: allow online change primary_conninfo |