On Tue, Jun 19, 2018 at 5:43 PM, Alexander Korotkov <a.korot...@postgrespro.ru> wrote: > On Tue, Jun 19, 2018 at 11:34 AM Masahiko Sawada <sawada.m...@gmail.com> > wrote: >> On Mon, Jun 18, 2018 at 1:56 PM, Alexander Korotkov >> > So, I'm proposing to raise maximum valus of >> > vacuum_cleanup_index_scale_factor to DBL_MAX. Any objections? >> > >> >> I agree to expand the maximum value. But if users don't want index >> cleanup it would be helpful if we have an option (e.g. setting to -1) >> to disable index cleanup while documenting a risk of disabling index >> cleanup. It seems to me that setting very high values means the same >> purpose. > > Yes, providing an option to completely disable b-tree index cleanup > would be good. But the problem is that we already use -1 value for > "use the default" in reloption. So, if even we will make -1 guc > option to mean "never cleanup", then we still wouldn't be able to make > reloption to work this way. Probably, we should use another "magical > value" in reloption for "use the default" semantics.
Right. We can add a new reloption specifying whether we use default value of vacuum_index_cleanup_scale_factor or not but it might be overkill. > >> Also, your patch lacks documentation update. > > Good catch, thank you. > >> BTW, I realized that postgresql.conf.sample doesn't have >> vacuum_cleanup_index_scale_factor option. Attached patch fixes it. > > It seems that you post a wrong attachment, because the patch you sent > is exactly same as mine. > Sorry, attached correct one. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index f43086f..5044450 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -154,6 +154,11 @@ #vacuum_cost_page_dirty = 20 # 0-10000 credits #vacuum_cost_limit = 200 # 1-10000 credits +# - Index Vacuum - +#vacuum_cleanup_index_scale_factor = 0.1 # fraction of total number of tuples + # before index cleanup. 0 never skips + # cleanup index + # - Background Writer - #bgwriter_delay = 200ms # 10-10000ms between rounds