From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | sawada(dot)mshk(at)gmail(dot)com |
Cc: | robertmhaas(at)gmail(dot)com, bossartn(at)amazon(dot)com, alvherre(at)2ndquadrant(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: New vacuum option to do only freezing |
Date: | 2019-04-03 04:17:02 |
Message-ID: | 20190403.131702.71087088.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Wed, 3 Apr 2019 12:10:03 +0900, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote in <CAD21AoBkaHka5sav5N6vvoKS9qpmrWRBdyNGP8S7M0SsPd0iyQ(at)mail(dot)gmail(dot)com>
> > And in the following part:
> >
> > + /* Set index cleanup option based on reloptions */
> > + if (params->index_cleanup == VACUUM_OPTION_DEFAULT)
> > + {
> > + if (onerel->rd_options == NULL ||
> > + ((StdRdOptions *) onerel->rd_options)->vacuum_index_cleanup)
> > + params->index_cleanup = VACUUM_OPTION_ENABLED;
> > + else
> > + params->index_cleanup = VACUUM_OPTION_DISABLED;
> > + }
> > +
> >
> > The option should not be false while VACUUM FULL,
>
> I think that we need to complain only when INDEX_CLEANUP option is
> disabled by an explicit option on the VACUUM command and FULL option
> is specified. It's no problem when vacuum_index_cleanup is false and
> FULL option is true. Since internally we don't use index cleanup when
> vacuum full I guess that we don't need to require index_cleanup being
> always true even when full option is specified.
I know it's safe. It's just about integrity of option values. So
I don't insist on that.
> > and maybe we
> > should complain in WARNING or NOTICE that the relopt is ignored.
>
> I think when users want to control index cleanup behavior manually
> they specify INDEX_CLEANUP option on the VACUUM command. So it seems
> to me that overwriting a reloption by an explicit option would be a
> natural behavior. I'm concerned that these message would rather
> confuse users.
If it "cannot be specified with FULL", it seems strange that it's
safe being specified by reloptions.
I'm rather thinking that INDEX_CLEANUP = false is ignorable even
being specified with FULL option, aand DISABLE_PAGE_SKIPPING for
VACUUM FULL shuld be ignored since VACUUM FULL doesn't skip pages
in the first place.
Couldn't we silence the DISABLE_PAGE_SKIPPING & FULL case instead
of complaining about INDEX_CLEANUP & FULL? If so, I feel just
ignoring the relopt cases is reasonable.
Yeah, perhaps I'm warrying too much.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2019-04-03 04:19:30 | Re: ToDo: show size of partitioned table |
Previous Message | Thomas Munro | 2019-04-03 04:14:36 | Strange coding in _mdfd_openseg() |