From: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
---|---|
To: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
Cc: | "Raji Sridar (raji)" <raji(at)cisco(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: [PERFORM] Concurrency issue under very heay loads |
Date: | 2009-07-17 14:32:06 |
Message-ID: | 1247841126.9349.6.camel@ayaki |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general 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
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Moran | 2009-07-17 14:43:51 | Re: Idle in transaction |
Previous Message | John | 2009-07-17 14:31:42 | Re: something to suggest indexes |
From | Date | Subject | |
---|---|---|---|
Next Message | Scara Maccai | 2009-07-17 14:36:34 | Re: cluster index on a table |
Previous Message | Craig Ringer | 2009-07-17 14:29:25 | Re: Concurrency issue under very heay loads |