Received: from rivest.xdrive.com (xd1.xdrive.com [65.166.147.200]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5IMP1a17751; Mon, 18 Jun 2001 18:25:01 -0400 (EDT) (envelope-from x@xman.org) Received: from rivest (rivest [127.0.0.1]) by rivest.xdrive.com (8.11.2/8.11.2) with ESMTP id f5IMNvN06716; Mon, 18 Jun 2001 15:23:57 -0700 Subject: Re: [SQL] Problems ensuring uniqueness? From: Christopher Smith To: Tom Lane Cc: pgsql-sql@postgresql.org, pgsql-jdbc@postgresql.org In-Reply-To: <8975.992901854@sss.pgh.pa.us> References: <992898628.6594.1.camel@rivest.xdrive.com> <8896.992900535@sss.pgh.pa.us> <992901470.6585.2.camel@rivest.xdrive.com> <8975.992901854@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution/0.10.99 (Preview Release) Date: 18 Jun 2001 15:23:57 -0700 Message-Id: <992903037.6594.3.camel@rivest.xdrive.com> Mime-Version: 1.0 X-Archive-Number: 200106/53 X-Sequence-Number: 794 On 18 Jun 2001 18:04:14 -0400, Tom Lane wrote: > Christopher Smith writes: > >> Um ... surely that should be "if count > 0" ? Or was that just a > >> transcription error? > >> > >> This approach certainly ought to work as desired given the exclusive > >> lock, so a silly typo seems like a plausible explanation... > > > Sorry, it is indeed a transcription error (sadly). > > Oh well. The next thought, given that you mention threads, is that > you've got multiple threads issuing commands to the same backend > connection; in which case the interlocking you think you have doesn't > exist at all... You got it bang on... I thought I had isolated access to the connections properly, but shortly after posting that last e-mail, had a eureka moment. I presume this will make the bug go away, so I'll encourage everyone to ignore this thread (other than as a warning ;-) until I've confirmed I still have the problem after making the correct adjustments. --Chris