On Thu, Dec 5, 2019 at 1:14 PM Alex Adriaanse <a...@oseberg.io> wrote: > We have a Postgres 10 database that we recently upgraded to Postgres 12 using > pg_upgrade. We recently discovered that there are 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 running Debian'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