At Wed, 3 Apr 2019 12:10:03 +0900, Masahiko Sawada <sawada.m...@gmail.com> wrote in <cad21aobkahka5sav5n6vvoks9qpmrwrbdyngp8s7m0sspd0...@mail.gmail.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