Re: SELECT FOR UPDATE NOWAIT and PostgreSQL 8.0 - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: SELECT FOR UPDATE NOWAIT and PostgreSQL 8.0
Date
Msg-id 200409151324.i8FDOsi07297@candle.pha.pa.us
Whole thread Raw
In response to Re: SELECT FOR UPDATE NOWAIT and PostgreSQL 8.0  (Devrim GUNDUZ <devrim@gunduz.org>)
List pgsql-hackers
Devrim GUNDUZ wrote:
> > Now we have LOCK TABLE ... NOWAIT; but I wonder whether we'll have the
> > SELECT ... NOWAIT one.  Today I got a request for this; and it was
> > reported that this feature will be used in a huge project.
> >
> > Well, it shouldn't be too much of a patch - just cloning the code?
> >
> > Perhaps they can start in development without it and we'll patch it in
> > later.
> 
> I learned that the code is ready. They'll change the code now.
> 
> >> Hmm... this seems the exact opposite of how I would tend to think
> >> the feature
> >> would be used... ie. you don't really care how long the query takes, just
> >> that you can't get the lock.
> >
> > Agreed - and this is important! I thought we'd done NOWAIT on the SELECT...
> >
> > Oh well, 8.1 will be better still.
> 
> Bruce: Any TODO here? ;)

OK, but the NOWAIT has to be done for SELECT FOR UPDATE, UPDATE, and
DELETE.  Anyone want to suggest an API for that?  Anddo you realize
there are lots of locks for those commands, like locks on pg_class and
stuff.  Would it be only for exclusive locks?  As you can see there are
some unanswered questions.

--  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: "Merlin Moncure"
Date:
Subject: Re: libpq and prepared statements progress for 8.0
Next
From: Chris Dunlop
Date:
Subject: Statement parsing problem ?