Re: Concurrency issue under very heay loads

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Concurrency issue under very heay loads
Дата
Msg-id 1247841126.9349.6.camel@ayaki
обсуждение исходный текст
Ответ на Re: Concurrency issue under very heay loads  (Scott Marlowe <scott.marlowe@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: cluster index on a table
Следующее
От: Scara Maccai
Дата:
Сообщение: Re: cluster index on a table