On Sat, Apr 6, 2019 at 10:23 AM Andres Freund <and...@anarazel.de> wrote: > > Hi, > > On 2019-04-04 15:05:55 -0400, Robert Haas wrote: > > On Wed, Apr 3, 2019 at 10:32 PM Masahiko Sawada <sawada.m...@gmail.com> > > wrote: > > > Attached the updated version patch. > > > > Committed with a little bit of documentation tweaking. > > I've closed the commitfest entry. I hope that's accurate? >
Yes, but Fujii-san pointed out that this option doesn't support toast tables and I think there is not specific reason why not supporting them. So it might be good to add toast.vacuum_index_cleanup. Attached patch. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 1a8184e..2421590 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -1390,7 +1390,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM </varlistentry> <varlistentry> - <term><literal>vacuum_index_cleanup</literal> (<type>boolean</type>)</term> + <term><literal>vacuum_index_cleanup</literal>, <literal>toast.vacuum_index_cleanup (<type>boolean</type>)</term> <listitem> <para> Enables or disables index cleanup when <command>VACUUM</command> is diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c index e2c0de3..f0cc9b8 100644 --- a/src/backend/access/common/reloptions.c +++ b/src/backend/access/common/reloptions.c @@ -142,7 +142,7 @@ static relopt_bool boolRelOpts[] = { "vacuum_index_cleanup", "Enables index vacuuming and index cleanup", - RELOPT_KIND_HEAP, + RELOPT_KIND_HEAP | RELOPT_KIND_TOAST, ShareUpdateExclusiveLock }, true diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 7c4e5fba..bb29a62 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -1037,6 +1037,7 @@ static const char *const table_storage_parameters[] = { "toast.autovacuum_vacuum_scale_factor", "toast.autovacuum_vacuum_threshold", "toast.log_autovacuum_min_duration", + "toast.vacuum_index_cleanup", "toast_tuple_target", "user_catalog_table", "vacuum_index_cleanup",