Re: [HACKERS] [GENERAL] Bug with sequence

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Thomas O'Connell" <tfo(at)monsterlabs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: [HACKERS] [GENERAL] Bug with sequence
Date: 2002-11-21 21:52:18
Message-ID: Pine.LNX.4.33.0211211450100.23804-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-sql

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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Wood 2002-11-21 21:52:30 Re: Rép. : [GENERAL] double quotes around table and column names
Previous Message Medi Montaseri 2002-11-21 21:40:22 Re: Request assistance connecting with Pg::connectdb

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-11-21 21:59:53 Re: Optimizer & boolean syntax
Previous Message scott.marlowe 2002-11-21 21:49:18 Re: performance of insert/delete/update

Browse pgsql-sql by date

  From Date Subject
Next Message Manuel Sugawara 2002-11-21 22:38:13 Re: [SQL] psql on FreeBSD 4.7-RELEASE-p2 and greek (iso8859-7) chars
Previous Message Rod Taylor 2002-11-21 20:23:50 Re: [HACKERS] [GENERAL] Bug with sequence