Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 15D5E475AE4; Thu, 21 Nov 2002 16:53:35 -0500 (EST) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by postgresql.org (Postfix) with ESMTP id 86E854759AF; Thu, 21 Nov 2002 16:53:34 -0500 (EST) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.6/8.12.6) with ESMTP id gALLqFGx026022; Thu, 21 Nov 2002 14:52:15 -0700 (MST) Date: Thu, 21 Nov 2002 14:52:18 -0700 (MST) From: "scott.marlowe" To: Rod Taylor Cc: Bruce Momjian , "Thomas O'Connell" , PostgreSQL-development , Subject: Re: [HACKERS] [GENERAL] Bug with sequence In-Reply-To: <1037910229.56165.20.camel@jester> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailBodyFilter: Message body has not been filtered X-MailScanner: Found to be clean X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/376 X-Sequence-Number: 10518 On 21 Nov 2002, Rod Taylor wrote: > On Thu, 2002-11-21 at 15:09, scott.marlowe wrote: > > On 21 Nov 2002, Rod Taylor wrote: > > > > > On Thu, 2002-11-21 at 14:11, Bruce Momjian wrote: > > > > Of course, those would be SQL purists who _don't_ understand > > > > concurrency issues. ;-) > > > > > > Or they're the kind that locks the entire table for any given insert. > > > > Isn't that what Bruce just said? ;^) > > I suppose so. I took what Bruce said to be that multiple users could > get the same ID. > > I keep having developers want to make their own table for a sequence, > then use id = id + 1 -- so they hold a lock on it for the duration of > the transaction. I was just funnin' with ya, but the point behind it was that either way (with or without a lock) that using something other than a sequence is probably a bad idea. Either way, under parallel load, you have data consistency issues, or you have poor performance issues.