Re: SELECT FOR UPDATE NOWAIT - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: SELECT FOR UPDATE NOWAIT
Date
Msg-id 200307231930.h6NJUXE11914@candle.pha.pa.us
Whole thread Raw
In response to Re: SELECT FOR UPDATE NOWAIT  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> "Paulo Scardine" <paulos@cimed.ind.br> writes:
> > - Where is the best place to put this?
> 
> I think it would be a really *bad* idea to put it in LockAcquire; that
> risks breaking things that you don't want broken.
> 
> Whether it's special syntax or a GUC variable, the restriction should
> only apply to SELECT FOR UPDATE row locks, perhaps user-commanded LOCK
> TABLE operations, and maybe one or two other places that are known to
> be used only for user-written operations and not for system-initiated
> ones.  Those places would need to check whether to do a conditional
> or unconditional lock.

My original idea was to have it apply only for exclusive locks.  It
seemed those were mostly the locks didn't want to wait for. Shared
locking pg_class is something that you would want to wait for.

--  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: "Jenny -"
Date:
Subject: how do i turn off the html tags??
Next
From: Josh Berkus
Date:
Subject: Re: Feature request -- Log Database Name