Search Postgresql Archives

Re: duplicate key violates unique on a nextval() field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ids and could have bugs. Allowing pg to assign the value is safe, using nextval is safe--I'd look for client code that tries to 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@xxxxxxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux