Re: pg_dump issues - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_dump issues
Date
Msg-id 15826.1317655262@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump issues  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sat, Oct 1, 2011 at 9:46 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>> How would that help? This isn't a lock failure.

> It is, rather, a failure to lock.  Currently, LOCK TABLE only works on
> tables, and pg_dump only applies it to tables.  If the offending
> object had been a table rather than a view, pg_dump would (I believe)
> have blocked trying to obtain an AccessShareLock against the existing
> AccessExclusiveLock.

Yeah, and it would still have failed once the lock was released.

Short of providing some sort of global DDL-blocking lock (with attendant
performance consequences) it's not clear how to create an entirely
bulletproof solution here.  This isn't a new problem --- we've been
aware of pg_dump's limitations in this area for many years.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Should we get rid of custom_variable_classes altogether?
Next
From: Bruce Momjian
Date:
Subject: Re: Bug with pg_ctl -w/wait and config-only directories