Re: SELECT FOR UPDATE NOWAIT and PostgreSQL 8.0

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Devrim GUNDUZ <devrim(at)gunduz(dot)org>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SELECT FOR UPDATE NOWAIT and PostgreSQL 8.0
Date: 2004-09-15 13:24:54
Message-ID: 200409151324.i8FDOsi07297@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Dunlop 2004-09-15 13:43:47 Statement parsing problem ?
Previous Message Merlin Moncure 2004-09-15 12:48:58 Re: libpq and prepared statements progress for 8.0