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

2011-08-30 Thread Craig Ringer
On 31/08/2011 1:28 AM, Peter Warasin wrote: 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

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

2011-08-30 Thread Peter Warasin
hi On 30/08/11 19:43, Daniel Verite wrote: >> The message tells me furthermore that freeradius tries to insert a >> record with a radacctid which already exists. > > No, the message you quoted tells about the other unique constraint, the one > named radacct_unique. It's not related to the bigseri

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

2011-08-30 Thread Daniel Verite
Peter Warasin wrote: > The message tells me furthermore that freeradius tries to insert a > record with a radacctid which already exists. No, the message you quoted tells about the other unique constraint, the one named radacct_unique. It's not related to the bigserial primary key. Best

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

2011-08-30 Thread Peter Warasin
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 val

[GENERAL] duplicate key violates unique on a nextval() field

2011-08-30 Thread Peter Warasin
hi guys (and hopefully also ladies) I use postgresql as a backend for freeradius with a coova-chilli hotspot we have an installation with plenty of concurrent users with a lot of traffic, however the database is not under that huge load. Normally all is working fine, but from time to time i get t

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

2011-08-30 Thread Scott Ribe
On Aug 30, 2011, at 10:19 AM, Peter Warasin wrote: > The message tells me furthermore that freeradius tries to insert a > record with a radacctid which already exists. > > But how can that happen when it is bigserial? Postgres only assigns the value if it is not explicitly provided. Any client,

[GENERAL] duplicate key violates unique on a nextval() field

2011-08-30 Thread Peter Warasin
hi guys (and hopefully also ladies) I use postgresql as a backend for freeradius with a coova-chilli hotspot we have an installation with plenty of concurrent users with a lot of traffic, however the database is not under that huge load. Normally all is working fine, but from time to time i get t