X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id AB714D1E93D for ; Tue, 16 Mar 2004 15:48:30 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 14745-03 for ; Tue, 16 Mar 2004 11:48:28 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id A4B0DD1E92B for ; Tue, 16 Mar 2004 11:48:23 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i2GFmQpc025032; Tue, 16 Mar 2004 10:48:26 -0500 (EST) To: "Luis P Caamano" Cc: pgsql-sql@postgresql.org Subject: Re: Can statement_timeout emulated NOWAIT? In-reply-to: References: Comments: In-reply-to "Luis P Caamano" message dated "Tue, 16 Mar 2004 08:58:32 -0500" Date: Tue, 16 Mar 2004 10:48:26 -0500 Message-ID: <25031.1079452106@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/175 X-Sequence-Number: 17274 "Luis P Caamano" 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