Re: BUG #6258: Lock Sequence

Поиск
Список
Период
Сортировка
От Laerson keler
Тема Re: BUG #6258: Lock Sequence
Дата
Msg-id CAFk5V3PSpYAn8Bivq-qdNCpHvTtu8E2Wbmri1x0ePiCS0AqoLw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #6258: Lock Sequence  (Jaime Casanova <jaime@2ndquadrant.com>)
Список pgsql-bugs
good idea. I will try.
Thank you.

[]Laerson Keler
laerson.keler@lkmc.com.br
Cel: 11 9914-4030
Res: 11 3404-4632


2011/10/17 Jaime Casanova <jaime@2ndquadrant.com>

> On Mon, Oct 17, 2011 at 2:43 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >
> > There really is not any way to generate guaranteed-hole-free sequences
> > using sequence objects.  If you have to have that, I'd suggest locking
> > the table against other writes and then fetching MAX(id) + 1.  It's not
> > very fast, and it's not at all concurrent, but that's the price of
> > ensuring no holes.  Personally I'd rethink how badly you need that
> > property.
> >
>
> another option is to create a table to use as a sequence, and lock
> that table everytime you need a new value... is not concurrent also,
> but at least faster... unless i'm missing something
>
> --
> Jaime Casanova         www.2ndQuadrant.com
> Professional PostgreSQL: Soporte 24x7 y capacitaci=F3n
>

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Laerson keler
Дата:
Сообщение: Re: BUG #6258: Lock Sequence
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Tablespace files deleted in continuous run