From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nico Williams <nico@cryptonector.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: pg_dump(1) failures when concurrently refreshing mat views
Date: Wed, 19 Apr 2017 18:07:49 -0400
Message-ID: <1276.1492639669@sss.pgh.pa.us> (raw)
In-Reply-To: <20170419212356.GA2844@localhost>
References: <20170419193212.GD2856@localhost>
<31589.1492636831@sss.pgh.pa.us>
<20170419212356.GA2844@localhost>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Nico Williams <nico@cryptonector.com> writes:
> On Wed, Apr 19, 2017 at 05:20:31PM -0400, Tom Lane wrote:
>> ... uh, really? It's not supposed to take anything higher than ACCESS
>> SHARE, which should coexist fine with anything short of ACCESS EXCLUSIVE.
> Whoops, sorry, that's a mistake in drafting the report. You're right,
> it takes an ACCESS SHARE MODE lock, NOWAIT. The remainder of the report
> remains correct.
But REFRESH CONCURRENTLY takes EXCLUSIVE lock, not ACCESS EXCLUSIVE lock,
so it won't conflict with pg_dump. There's something missing from your
explanation.
Also, the only use of NOWAIT I see is in a parallel pg_dump worker.
It is known that parallel pg_dump can lead to deadlocks if third
parties are taking ACCESS EXCLUSIVE locks --- but you haven't identified
where the ACCESS EXCLUSIVE request is coming from.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: tgl@sss.pgh.pa.us, nico@cryptonector.com
Subject: Re: pg_dump(1) failures when concurrently refreshing mat views
In-Reply-To: <1276.1492639669@sss.pgh.pa.us>
References: <20170419193212.GD2856@localhost> <31589.1492636831@sss.pgh.pa.us> <20170419212356.GA2844@localhost> <1276.1492639669@sss.pgh.pa.us>
* 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