Re: txrep duplicated key with postgresql

2019-12-10 Thread Benny Pedersen
On 2019-12-09 22:52, Daniel J. Luke wrote: I uploaded a patch for postgresql on https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7218 a while ago - but I haven't had time to clean it up into something that should be included into a release. added this patch, seem to solve it It might serve

Re: txrep duplicated key with postgresql

2019-12-09 Thread Daniel J. Luke
I uploaded a patch for postgresql on https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7218 a while ago - but I haven't had time to clean it up into something that should be included into a release. It might serve as inspiration for someone else before I end up having time to get to it, thoug

Re: txrep duplicated key with postgresql

2019-12-09 Thread Martin Gregorie
On Mon, 2019-12-09 at 11:41 -0800, John Hardin wrote: > This sounds more like the "does that tuple already exist?" logic is > failing, causing it to think it needs to create a new entry, which > the unique key is (correctly) preventing. > > You don't lightly bypass unique keys. They are there for

Re: txrep duplicated key with postgresql

2019-12-09 Thread John Hardin
On Mon, 9 Dec 2019, RW wrote: On Mon, 09 Dec 2019 13:14:45 + Martin Gregorie wrote: The primary key for the public.txrep table must be unique, and evidently you already had a row with the same primary key. It seems likely that the combination [username, email, signedby and ip] will very of

Re: txrep duplicated key with postgresql

2019-12-09 Thread RW
On Mon, 09 Dec 2019 13:14:45 + Martin Gregorie wrote: > The primary key for the public.txrep table must be unique, and > evidently you already had a row with the same primary key. It seems > likely that the combination [username, email, signedby and ip] will > very often be duplicated, like ev

Re: txrep duplicated key with postgresql

2019-12-09 Thread Martin Gregorie
The primary key for the public.txrep table must be unique, and evidently you already had a row with the same primary key. It seems likely that the combination [username, email, signedby and ip] will very often be duplicated, like every time you get another email from that person. Try this: - redef

txrep duplicated key with postgresql

2019-12-09 Thread Benny Pedersen
2019-12-09 12:07:53.477 UTC [16458] DETAIL: Key (username, email, signedby, ip)=(u...@example.org, u...@example.com, example.com, none) already exists. 2019-12-09 12:07:53.477 UTC [16458] STATEMENT: INSERT INTO txrep (username,email,ip,count,totscore,signedby) VALUES ($1,$2,$3,$4,$5,$6) 20