Re: duplicate key violates unique on a nextval() field
От | Peter Warasin |
---|---|
Тема | Re: duplicate key violates unique on a nextval() field |
Дата | |
Msg-id | 4E5D1DB9.8020704@endian.com обсуждение исходный текст |
Ответ на | Re: duplicate key violates unique on a nextval() field (Scott Ribe <scott_ribe@elevated-dev.com>) |
Ответы |
Re: duplicate key violates unique on a nextval() field
|
Список | pgsql-general |
Hi thank you for answering! On 30/08/11 18:56, Scott Ribe wrote: >> But how can that happen when it is bigserial? > > Postgres only assigns the value if it is not explicitly provided. Any client, freeradius included, could be assigning idsand could have bugs. Allowing pg to assign the value is safe, using nextval is safe--I'd look for client code that triesto get ranges ahead of time & cache... freeradius is not supplying an id. that field is left away as it should be in order to use nextval that renders the whole thing strange.. also because it happens only from time to time. it must be related to load. when the system is under heavy load something goes wrong and 2 concurrent transactions get the same unique id. but how?? peter -- :: e n d i a n :: security with passion :: peter warasin :: http://www.endian.com :: peter@endian.com
В списке pgsql-general по дате отправления: