Re: Concurrency issue under very heay loads - Mailing list pgsql-performance

From Craig Ringer
Subject Re: Concurrency issue under very heay loads
Date
Msg-id 1247841126.9349.6.camel@ayaki
Whole thread Raw
In response to Re: Concurrency issue under very heay loads  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-performance
On Thu, 2009-07-16 at 00:11 -0600, Scott Marlowe wrote:

> As others have said, a serial is a good idea, HOWEVER, if you can't
> have gaps in sequences, or each customer needs their own sequence,
> then you get to lock the rows / table / etc that you're mucking with
> to make sure you don't issue the same id number twice.

These days can't you just UPDATE ... RETURNING the sequence source
table? Or is there some concurrency issue there I'm not seeing? Other
than the awful impact on concurrent insert performance of course, but
you're stuck with that using any gapless sequence.

--
Craig Ringer


pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: cluster index on a table
Next
From: Scara Maccai
Date:
Subject: Re: cluster index on a table