Re: relcache refcount

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Alvaro Herrera" <alvherre(at)dcc(dot)uchile(dot)cl>, "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: relcache refcount
Date: 2004-05-14 13:35:41
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA40184D0D6@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-05-14 13:41:58 Re: [HACKERS] threads stuff/UnixWare
Previous Message Fabien COELHO 2004-05-14 13:26:15 Re: Bogus permissions display in 7.4