X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A1A6E9FA4A8 for ; Wed, 19 Jul 2006 12:06:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 17715-01 for ; Wed, 19 Jul 2006 12:06:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx00.ext.bfk.de (mx00.ext.bfk.de [217.29.46.125]) by postgresql.org (Postfix) with ESMTP id ED4E19FA47F for ; Wed, 19 Jul 2006 12:06:16 -0300 (ADT) Received: from fweimer by bfk.de with local id 1G3Dcs-0001KK-Ex; Wed, 19 Jul 2006 17:06:14 +0200 To: Tom Lane Cc: pgsql-sql@postgresql.org Subject: Re: INSERT/UPDATEs cycles and lack of phantom locking References: <82zmf60zf4.fsf@mid.bfk.de> <25634.1153319178@sss.pgh.pa.us> From: Florian Weimer Date: Wed, 19 Jul 2006 17:06:14 +0200 In-Reply-To: <25634.1153319178@sss.pgh.pa.us> (Tom Lane's message of "Wed, 19 Jul 2006 10:26:18 -0400") Message-ID: <827j291vo9.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/253 X-Sequence-Number: 25827 * Tom Lane: > Why do you think that? If you're running in READ COMMITTED mode then > each statement takes a new snapshot. Ah, I should have explained that. I might need the SERIALIZABLE isolation level in the future (this code doesn't need it, but other things in the same transaction might require it). In addition, it occurred to me that I get the INSERT failure only if there is a suitable PRIMARY KEY/UNIQUE constraint on the table. I haven't got that in all cases, so I need that advisory locking anyway, I fear. -- Florian Weimer BFK edv-consulting GmbH http://www.bfk.de/ Durlacher Allee 47 tel: +49-721-96201-1 D-76131 Karlsruhe fax: +49-721-96201-99