pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: huang <foggyglass@163.com>
To: Francisco Olarte <folarte@peoplecall.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: depesz@depesz.com <depesz@depesz.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: vacuumdb parallel has a deadlock detected in 9.5.4
Date: Thu, 29 Sep 2016 22:48:14 +0800 (CST)
Message-ID: <6827321f.f233.157766ad043.Coremail.foggyglass@163.com> (raw)
In-Reply-To: <CA+bJJbx8+SKBU=XUE+HxZHysh9226iMfTnA69AznwRTOEGtR7Q@mail.gmail.com>
References: <20160928172551.bxetdmwm7xwy74ue@depesz.com>
	<20160928203947.GA360063@alvherre.pgsql>
	<CA+bJJbx8+SKBU=XUE+HxZHysh9226iMfTnA69AznwRTOEGtR7Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>



At 2016-09-29 15:57:58, "Francisco Olarte" <folarte@peoplecall.com> wrote:
>Hi:
>
>On Wed, Sep 28, 2016 at 10:39 PM, Alvaro Herrera
><alvherre@2ndquadrant.com> wrote:
>>> > There is a error deadlock detected in vacuumdb parallel .
>>> > but if I do not use parallel , it has not deadlock detected .
>>> man vacuumdb says about -j option:
>>>
>>> >> Note that using this mode together with the -f (FULL) option might cause
>>> >> deadlock failures if certain system catalogs are processed in parallel.
>>> so, while I understand it's not pretty, it's well documented.
>>
>> Yeah.  However I think this behavior is rather unhelpful.  Maybe we
>> should try to fix it somehow, but I'm not sure how.  We could say that
>> pg_catalog tables can only be processed one at a time, instead of trying
>> to paralelize them?  For example: have vacuumdb fill two lists of
>> tables, one for pg_catalog and one for tables in other schemas.  Each
>> worker chooses a table from the pg_catalog list first if it's not empty
>> and there's no other worker doing one of these, otherwise one from the
>> other table.
>>
>> I think that'd fix it, while not destroying paralelizability too badly.
>
>I would propose another behaviour, which I think can solve the problem
>without introducing more complex code. Put a couple of flags to vacuum
>only catalog tables / non catalog tables ( I believe this can be
>served by include/exclude schemas too, which will be even more useful
>for other things ). This way one can do a full paralell vacuum of
>non-catalog objects followed by a serial one on catalog objects (
>which should not be too slow on 'normal' databases ) ( I propose this
>order because IIRC normal vacuum updates catalog tables so they get
>vacuumed after to tidy them )
>

>Francisco Olarte




hi , 
I just  hope  the  vacuumdb  parallel can quickly finishing work  .  
our database has a lot of tables .
they need vacuumdb . but the time is too long . 
so , I used the vacuumdb parallel . 
 
thanks to everyone .   : )


Best regards,
TT
28-09-2016





view thread (9+ messages)  latest in thread

Message-ID: <6827321f.f233.157766ad043.Coremail.foggyglass@163.com>
Permalink:  ../6827321f.f233.157766ad043.Coremail.foggyglass@163.com/
Also on:    postgresql.org/message-id/6827321f.f233.157766ad043.Coremail.foggyglass@163.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: foggyglass@163.com, folarte@peoplecall.com, alvherre@2ndquadrant.com, depesz@depesz.com
  Subject: Re: vacuumdb parallel has a deadlock detected in 9.5.4
  In-Reply-To: <6827321f.f233.157766ad043.Coremail.foggyglass@163.com>
  References: <20160928172551.bxetdmwm7xwy74ue@depesz.com> <20160928203947.GA360063@alvherre.pgsql> <CA+bJJbx8+SKBU=XUE+HxZHysh9226iMfTnA69AznwRTOEGtR7Q@mail.gmail.com> <6827321f.f233.157766ad043.Coremail.foggyglass@163.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox