From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: susanacastela@hotmail.com
Subject: BUG #16938: Duplicate records with same Primary Key
Date: Mon, 22 Mar 2021 17:28:56 +0000
Message-ID: <16938-be6ffd557b1f523e@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16938
Logged by: Susana Castela Ibáñez
Email address: susanacastela@hotmail.com
PostgreSQL version: 13.2
Operating system: Ubuntu
Description:
Hi,
We're running an instance of postgres 13.2 and some days ago we noticed
duplicated rows with the same primary key.
This was noticed restoring a pg_dump of our db that would be failing because
it tried to insert a duplicate primary key that violated the primary key
restriction.
Our live aplication showed no signs of error during this time.
The issue is very similar to what is described in this discussion:
https://dba.stackexchange.com/questions/62675/why-does-my-table-hold-duplicate-primary-keys
Running a "SELECT primary_key FROM table GROUP BY primary_key HAVING
COUNT(*) > 1" would be yielding the affected records.
We would be pleased to know if this is a known bug or what could be the
cause of it, also a definitive solution for it (we removed the conflictive
rows of the table but the issue reapeared after some days). For the time
being we're going to try to reindex our database.
Thanks a lot.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, susanacastela@hotmail.com
Subject: Re: BUG #16938: Duplicate records with same Primary Key
In-Reply-To: <16938-be6ffd557b1f523e@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox