Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jxmsO-0007mY-Eh for pgsql-general@arkaria.postgresql.org; Tue, 21 Jul 2020 07:39:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jxmsN-00088V-9h for pgsql-general@arkaria.postgresql.org; Tue, 21 Jul 2020 07:39:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jxmsN-00088M-1I for pgsql-general@lists.postgresql.org; Tue, 21 Jul 2020 07:39:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jxmsJ-0004gQ-Nb for pgsql-general@lists.postgresql.org; Tue, 21 Jul 2020 07:39:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 06L7dc5I809157; Tue, 21 Jul 2020 03:39:38 -0400 From: Tom Lane To: Thomas Kellerer cc: pgsql-general@lists.postgresql.org Subject: Re: Logical replication from 11.x to 12.x and "unique key violations" In-reply-to: <6f6b1a8b-1e2c-e971-1b1f-d7320e81f0a5@gmx.net> References: <76af9b83-74cc-88b5-23a7-0462774f472d@gmx.net> <578230.1595267248@sss.pgh.pa.us> <578923.1595268285@sss.pgh.pa.us> <6f6b1a8b-1e2c-e971-1b1f-d7320e81f0a5@gmx.net> Comments: In-reply-to Thomas Kellerer message dated "Tue, 21 Jul 2020 07:46:53 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <809155.1595317178.1@sss.pgh.pa.us> Date: Tue, 21 Jul 2020 03:39:38 -0400 Message-ID: <809156.1595317178@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Kellerer writes: > Tom Lane schrieb am 20.07.2020 um 20:04: >> Yeah, duplicate keys does seem odd here. Can you provide a self >> contained example? > I'll try, but this is a production system. > Extracting the necessary anonymous data will be tricky. If this is a PG bug, it should be possible to reproduce it with completely random/generated data. The key ingredient that you have and the rest of us don't is the process and timing by which the primary key values are introduced. > Is there any chance the version difference might cause this? > And a slightly outdated 11.x at that? Hmmm ... I do not recall any recent bug fixes that seem to match this symptom, but replication isn't a part of the code that I'm the world's best expert on. In any case, we do offer as standard advice that you should reproduce a problem on the latest minor release before filing a bug report. regards, tom lane