Re: vacuumdb and new VACUUM options - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: vacuumdb and new VACUUM options
Date
Msg-id CAHGQGwHE_s1O4dC9LX1hK4kPo=yojDcvgGTqJ4rwus5PqgZcgg@mail.gmail.com
Whole thread Raw
In response to Re: vacuumdb and new VACUUM options  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: vacuumdb and new VACUUM options  (Euler Taveira <euler@timbira.com.br>)
List pgsql-hackers
On Wed, May 8, 2019 at 9:32 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> On Wed, May 8, 2019 at 2:41 AM Fujii Masao <masao.fujii@gmail.com> wrote:
> >
> > Hi,
> >
> > vacuumdb command supports the corresponding options to
> > any VACUUM parameters except INDEX_CLEANUP and TRUNCATE
> > that were added recently. Should vacuumdb also support those
> > new parameters, i.e., add --index-cleanup and --truncate options
> > to the command?
>
> I think it's a good idea to add new options of these parameters for
> vacuumdb. While making INDEX_CLEANUP option patch I also attached the
> patch for INDEX_CLEANUP parameter before[1], although it adds
> --disable-index-cleanup option instead.

Regarding INDEX_CLEANUP, now VACUUM has three modes;

(1) VACUUM (INDEX_CLEANUP on) does index cleanup
        whatever vacuum_index_cleanup reloption is.
(2) VACUUM (INDEX_CLEANUP off) does not do index cleanup
        whatever vacuum_index_cleanup reloption is.
(3) plain VACUUM decides whether to do index cleanup
        according to vacuum_index_cleanup reloption.

If no option for index cleanup is specified, vacuumdb command
should work in the mode (3). IMO this is intuitive.

The question is; we should support vacuumdb option for (1), i.e.,,
something like --index-cleanup option is added?
Or for (2), i.e., something like --disable-index-cleanup option is added
as your patch does? Or for both?

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Patch: doc for pg_logical_emit_message()
Next
From: Robert Haas
Date:
Subject: Re: any suggestions to detect memory corruption