Re: Can statement_timeout emulated NOWAIT?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Luis P Caamano" <lcaamano(at)mindspring(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Can statement_timeout emulated NOWAIT?
Date: 2004-03-16 15:48:26
Message-ID: 25031.1079452106@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Luis P Caamano" <lcaamano(at)mindspring(dot)com> writes:
> I've researched the recent discussions about statement_timeout
> and NOWAIT and I'd like to confirm my understanding of the
> situation before acting on it. Please let me know if the
> following statements are true:

> - LOCK TABLE ... NOWAIT has been checked in and will be available
> in 7.5

Yes.

> - SELECT ... FOR UPDATE NOWAIT is in the TODO list (among other
> NOWAIT commands) but it will also be available in 7.5

I haven't seen anyone working on that.

> - Using "SET LOCAL statement_timeout=xxx" can be used before
> "SELECT ... FOR UPDATE" to emulate NOWAIT when the select
> is simple and involves a relatively small number of rows.

Yes, if you are sure you know how long the select "ought" to take.

> - The error raised by statement_timeout and NOWAIT will be the
> same.

Wouldn't expect so. (Right now, I think statement_timeout reports
the same error code as query cancel, which is pretty bogus also.)

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2004-03-16 15:56:54 Re: Can statement_timeout emulated NOWAIT?
Previous Message Theodore Petrosky 2004-03-16 14:31:07 Re: [SQL] could not create shared memory segment: Invalid argument