DB Error: ERROR: duplicate key value violates unique constraint "notifications_pkey"

Hi,
i get this error

DB Error: ERROR:  duplicate key value violates unique constraint "notifications_pkey"\nDETAIL:  Key (notification_id)=(50) already exists.

when I am trying to upload a new CSS in the journal setup.

I am on OJS 2.4.1 running with postgres.

Actually it seems that the problem is that when I run the tools/upgrade.php (because I have added a new plugin) the id counter for notifications table is reset from 1

Thanks for the help,
andrea

Hi Andrea,

I suspect the sequence in PostgreSQL that generates new IDs for the notifications table has gotten reset somehow and is generating IDs that already exist in the database. See e.g. this post:

Regards,
Alec Smecher
Public Knowledge Project Team