Re: SELECT FOR UPDATE NOWAIT

From: "Paulo Scardine" <paulos(at)cimed(dot)ind(dot)br>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SELECT FOR UPDATE NOWAIT
Date: 2003-07-23 11:36:55
Message-ID: 008601c3510e$b7f7d3d0$63000a0a@cimed.ind.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(Excuse my english, my native language is portuguese)

> I think I'm a quite attentive to the SQL and HACKERS list, and I see
> requests for a NOWAIT option at least once a month, and it's growing.
> Regards, Christoph

Yes. I have done a little google about "pgsql select for update nowait" and
find lot of people looking for this feature.

If there is a lock and NOWAIT is specified, then raise error instead of
waiting for the lock to release. We have some long distance connections that
get very busy sometimes and is hard to distinguish between network problems
and locked rows.

Do you see it as something hard to implement? Any advice?
Is it just to add an "opt_nowait" to the "FOR UPDATE" clause in the parser
and checking for this option when trying to get the lock later?

TIA,
--
Paulo Scardine

----- Original Message -----
From: "Christoph Haller" <ch(at)rodos(dot)fzk(dot)de>
Sent: Wednesday, July 23, 2003 4:35 AM
Subject: Re: [HACKERS] SELECT FOR UPDATE NOWAIT
...

> > > Lookup STATEMENT_TIMEOUT and set it to a very short time.
> >
> > Some people have said they want to distinguish between a slow query
> > (busy system) and waiting on a lock. I can particulary see wanting to
>
> > do a NOWAIT only on exclusive locks --- not sure how many really want
> > that, though.
> >

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.490 / Virus Database: 289 - Release Date: 16/6/2003

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2003-07-23 12:16:58 Re:
Previous Message Patrick Welche 2003-07-23 11:11:56 cvs problem