Re: Corruption with duplicate primary key - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Corruption with duplicate primary key
Date
Msg-id CAH2-Wzn1eAuiQZF3Na_C4bCZeGfU-4v+XC-3XqDbVByp4sdTvw@mail.gmail.com
Whole thread Raw
In response to Corruption with duplicate primary key  (Alex Adriaanse <alex@oseberg.io>)
Responses Re: Corruption with duplicate primary key  (Alex Adriaanse <alex@oseberg.io>)
List pgsql-hackers
On Thu, Dec 5, 2019 at 1:14 PM Alex Adriaanse <alex@oseberg.io> wrote:
> We have a Postgres 10 database that we recently upgraded to Postgres 12 using pg_upgrade. We recently discovered that
thereare rows in one of the tables that have duplicate primary keys:
 

What's the timeline here? In other words, does it look like these rows
were updated and/or deleted before, around the same time as, or after
the upgrade?

The symptoms you report seem fairly generic to me, at least at first
blush. They could be caused by storage level inconsistencies that
could have many causes.

> This database runs inside Docker, with the data directory bind-mounted to a reflink-enabled XFS filesystem. The VM is
runningDebian's 4.19.16-1~bpo9+1 kernel inside an AWS EC2 instance. We have Debezium stream data from this database via
pgoutput.

That seems suspicious, since reflink support for XFS is rather immature.

How did you invoke pg_upgrade? Did you use the --link (hard link) option?

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Runtime pruning problem
Next
From: Tom Lane
Date:
Subject: Re: [Proposal] Level4 Warnings show many shadow vars