Re: swapping relfilenodes (was: Re: locks in CREATE TRIGGER, - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: swapping relfilenodes (was: Re: locks in CREATE TRIGGER,
Date
Msg-id 200503230451.j2N4pG927892@candle.pha.pa.us
Whole thread Raw
In response to Re: swapping relfilenodes (was: Re: locks in CREATE TRIGGER,  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > In fact, would a truncate during a backup cause the backup to be
> > inconsistent because it wouldn't be a true snapshot of the database at
> > backup start time?  Seems so.
> 
> No, because pg_dump holds AccessShareLock on every table that it intends
> to dump, thereby ensuring that TRUNCATE/CLUSTER/etc are held off.  The
> proposal to weaken the locks that those operations take would in fact
> break pg_dump.

Oh, it pre-locks.  I didn't know that.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: swapping relfilenodes (was: Re: locks in CREATE TRIGGER,
Next
From: Tom Lane
Date:
Subject: Re: locks in CREATE TRIGGER, ADD FK