Hi,

first of all, thanks to all, that replied!

On Wed, Nov 16, 2005 at 08:28:31AM +0100, Martijn van Oosterhout wrote:
> On Wed, Nov 16, 2005 at 08:09:31AM +0100, Yann Michel wrote:
> > Well, thanks for all the answers. Are the locks then released once they
> > are not needed any more like in 2PC?
> 
> 2PC doesn't release any locks, it can't to maintain integrity.

Aehm. sorry I meant 2PL ... all this accronyms... ;-)
The normal 2PL releases the locks once they are not needed anymore but
can not aquire new ones. Strict 2PL releases them all at one point.

> > That should still leaqve the taken snapshot of the released table in a
> > consistent state but might enable other transactions to work on that one
> > table once it is released. 
> 
> ACCESS SHARE means what it says, it stops the table being VACUUMed and
> a few other things, but doesn't block INSERTs, UPDATEs or DELETEs.

Thanks. BTW: Is there anything about locks and their meaning inside of
the Docs? If not, wouldn't that be nice?

> pg_dump doesn't blocks inserts, so your problem must be somewhere
> else... Are you running VACUUM anywhere. It's possible that pg_dump is
> blocking VACUUM which blocks your inserts...

Well, now that I'm thinking about, what you've written I think this is
exactly the point. I think, that there is a VACUUM waiting for the dump
to finish whereas the INSERTS are waiting for the VACUUM to finish.

Thannks!

Cheers,
Yann

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to