Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 147871337B68 for ; Fri, 22 Apr 2011 17:58:53 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 35247-08 for ; Fri, 22 Apr 2011 20:58:46 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 415E81337B47 for ; Fri, 22 Apr 2011 17:58:44 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p3MKwiPc010314; Fri, 22 Apr 2011 16:58:44 -0400 (EDT) To: Craig James cc: "pgsql-admin@postgresql.org" Subject: Re: select for update In-reply-to: <4DB1BFC2.7020806@emolecules.com> References: <4DB1BFC2.7020806@emolecules.com> Comments: In-reply-to Craig James message dated "Fri, 22 Apr 2011 10:49:54 -0700" Date: Fri, 22 Apr 2011 16:58:44 -0400 Message-ID: <10313.1303505924@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/213 X-Sequence-Number: 37394 Craig James writes: > select objectid from archive where db_id is null limit 1 for update The interaction between LIMIT and FOR UPDATE changed in 9.0 ... what PG version are you using? regards, tom lane