Re: [HACKERS] Block level parallel vacuum
От | Masahiko Sawada |
---|---|
Тема | Re: [HACKERS] Block level parallel vacuum |
Дата | |
Msg-id | CAD21AoBZdoqvLgaia8i2_qokQ2j0yXRHNokoSeU2t2esAQON8A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Block level parallel vacuum (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: [HACKERS] Block level parallel vacuum
|
Список | pgsql-hackers |
On Thu, Oct 10, 2019 at 2:19 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Fri, Oct 4, 2019 at 4:18 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > > On Wed, Oct 2, 2019 at 7:29 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > >> > > Few more comments: Thank you for reviewing the patch! > --------------------------------- > 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. Fixed. > > 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. Agreed. Attached the latest version patch although the memory usage problem is under discussion. I'll update the patches according to the result of that discussion. Regards, -- Masahiko Sawada
Вложения
В списке pgsql-hackers по дате отправления: