Re: relcache refcount - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: relcache refcount
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA40184D0D6@m0114.s-mxs.net
Whole thread Raw
In response to relcache refcount  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
> > Why can't we keep all locks until main tx end ?
>
> For committed subtransactions we have to do that, yes, but for aborted
> subtransactions we must release.  Otherwise you can't implement a retry
> loop around a potentially-deadlocking operation.

Ok, that would certainly be good to have, but it is imho not a "must have".

> > (I am assuming that a deadlock will still break the whole tx)
>
> Wrong.  We might as well not bother with the entire project.

There are plenty of examples that do not involve deadlocks.
The most prominent was plobably "insert -> duplicate key -> update instead"
Also the new NOLOCK statements come to mind, ...

Andreas


pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: Bogus permissions display in 7.4
Next
From: Gaetano Mendola
Date:
Subject: invalid type internal size -1