RE: Duplicate key in UUID primary key index...

From: Eric Tobias <ettobias(at)hotmail(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: RE: Duplicate key in UUID primary key index...
Date: 2021-10-14 03:02:08
Message-ID: MW3PR17MB418624B85780DDD44FE9E291DCB89@MW3PR17MB4186.namprd17.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table with a UUID as the primary key field. I am using a procedure to insert a parent and child record and using a UUID generated by an external system (webhook). The UUID insert is generating a "duplicate key" error on insert, but when I SELECT the uuid, nothing is returned. I've even manually scanned all the UUIDs in the table and verified the UUID I'm trying to insert does not exist in the table, and yet nothing I do will get past the duplicate key.

I've tried to vacuum the table, recreate the primary key, recreate the table, and even recreated the database and remigrated data to it. And it's not just one UUID... out of 350,000 records, there are about 20 or so that are throwing "duplicate key" errors. Any ideas what I can try next?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message 张进涛 2021-10-14 06:21:25 ask for help:I want to compile a dynamic library file, such as libpsqlodbc w.so
Previous Message Tom Lane 2021-10-13 23:50:57 Re: NOTIFY queue is at 66% and climbing...