On Fri, Oct 4, 2019 at 4:18 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > On Wed, Oct 2, 2019 at 7:29 PM Masahiko Sawada <sawada.m...@gmail.com> wrote: >>
Few more comments: --------------------------------- 1. Caurrently parallel vacuum is allowed for temporary relations which is wrong. It leads to below error: postgres=# create temporary table tmp_t1(c1 int, c2 char(10)); CREATE TABLE postgres=# create index idx_tmp_t1 on tmp_t1(c1); CREATE INDEX postgres=# create index idx1_tmp_t1 on tmp_t1(c2); CREATE INDEX postgres=# insert into tmp_t1 values(generate_series(1,10000),'aaaa'); INSERT 0 10000 postgres=# delete from tmp_t1 where c1 > 5000; DELETE 5000 postgres=# vacuum (parallel 2) tmp_t1; ERROR: cannot access temporary tables during a parallel operation CONTEXT: parallel worker The parallel vacuum shouldn't be allowed for temporary relations. 2. --- a/doc/src/sgml/ref/vacuum.sgml +++ b/doc/src/sgml/ref/vacuum.sgml @@ -34,6 +34,7 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet SKIP_LOCKED [ <replaceable class="parameter">boolean</replaceable> ] INDEX_CLEANUP [ <replaceable class="parameter">boolean</replaceable> ] TRUNCATE [ <replaceable class="parameter">boolean</replaceable> ] + PARALLEL [ <replaceable class="parameter">integer</replaceable> ] Now, if the user gives a command like Vacuum (analyze, parallel) <table_name>; it is not very obvious that a parallel option will be only used for vacuum purposes but not for analyze. I think we can add a note in the docs to mention this explicitly. This can avoid any confusion. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com