Re: BUG #4307: INSERT fails with primary key contraint

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4307: INSERT fails with primary key contraint
Дата
Msg-id 14674.1216164200@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4307: INSERT fails with primary key contraint  ("Oskars Ozols" <oskars.ozols@gmail.com>)
Список pgsql-bugs
"Oskars Ozols" <oskars.ozols@gmail.com> writes:
> I have noticed that during high load Postgre starts to use old free sequence
> values (like 156112 in my sample). Sometimes it's ok, but sometimes it fails
> with error above.

This is fairly hard to believe; the sequence code was debugged years
ago.  Particularly seeing that your application is evidently supplying
the id value for itself in the INSERT (from a previous nextval, or perhaps
some other way?), it seems much more likely that there's a bug on the
application side.

If you'd like us to pursue this, please put together a self-contained
test case.  Assuming it's real, perhaps a simple custom script for
pgbench would serve to show the problem.

            regards, tom lane

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

Предыдущее
От: "Oskars Ozols"
Дата:
Сообщение: BUG #4307: INSERT fails with primary key contraint
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: BUG #4307: INSERT fails with primary key contraint