Re: pg_restore encounter deadlock since PostgreSQL bringing up

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: zh1029 <zh1029(at)sina(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_restore encounter deadlock since PostgreSQL bringing up
Date: 2015-11-17 14:39:28
Message-ID: 29263.1447771168@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

zh1029 <zh1029(at)sina(dot)com> writes:
> Unfortunately what's the process 2720 is unknown as no any else log to
> indicate it. It might because the debug level of PostgreSQL had been set too
> lower to show more.

The query you quoted for 2720 looks exactly like one that pg_dump will
issue, cf dumpSequence(). What I think is going on here is that you've
got some cron job that aggressively connects to the database and runs a
pg_dump the moment you start it. It's unsurprising that that would
deadlock against a pg_restore -C.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Geoff Winkless 2015-11-17 14:53:21 Re: referencing other INSERT VALUES columns inside the insert
Previous Message Adrian Klaver 2015-11-17 14:36:09 Re: referencing other INSERT VALUES columns inside the insert