Re: Bug #613: Sequence values fall back to previously checkpointed

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug #613: Sequence values fall back to previously checkpointed
Дата
Msg-id 10283.1016048377@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bug #613: Sequence values fall back to previously checkpointed  (Ben Grimm <bgrimm@zaeon.com>)
Ответы Re: Bug #613: Sequence values fall back to previously checkpointed  (Ben Grimm <bgrimm@zaeon.com>)
Список pgsql-bugs
Ben Grimm <bgrimm@zaeon.com> writes:
> It seems like you just need to ensure that when the sequence is loaded
> from disk that log_cnt gets updated and written back to disk before the
> sequence is used.  I'm not sure of the impact, but I can't reproduce the
> bugs after making these changes.  I just added a flag to the SeqTableData
> struct to say whether its been logged yet - this seems like overkill..
> but it works for me :-)  (at least in the scenarios I've tried)

I don't think that can work.  AFAICT what your patch does is to ensure
a WAL record is written by the first nextval() in any given backend
session.  But what we need is to ensure a WAL record from the first
nextval() after a checkpoint.  The failure cases for your patch would
involve backends that have been running for longer than one checkpoint
cycle ...

            regards, tom lane

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

Предыдущее
От: bgrimm@zaeon.com
Дата:
Сообщение: Re: Bug #613: Sequence values fall back to previously checkpointed
Следующее
От: Per Winkvist
Дата:
Сообщение: Case sensitive table names ?