Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r2xkh-001a8X-Mw for pgsql-admin@arkaria.postgresql.org; Tue, 14 Nov 2023 18:03:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r2xkg-00A8j2-8G for pgsql-admin@arkaria.postgresql.org; Tue, 14 Nov 2023 18:03:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r2xkf-00A8ht-Sl for pgsql-admin@lists.postgresql.org; Tue, 14 Nov 2023 18:03:05 +0000 Received: from mailout.easywhatthehell.com ([2620:49:8:1007::400] helo=mailout.easymail.ca) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r2xkc-005ZY4-5u for pgsql-admin@postgresql.org; Tue, 14 Nov 2023 18:03:04 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 31CB3649B2; Tue, 14 Nov 2023 18:02:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1699984979; bh=UIEI/BocAFywjY7w2jbDeoWGN+NWojpJ2g3y0/up3+4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=vy9ImsaPEU9cXDBBVECNM59cpf82OtP2XDhIj+vsr2oBmhlKrShYSt4CRu1Dp+sOb 1T5jvIYIsmBffOciof2qm+uEWL2jtyLFIobuMLPJsxLIOUa66utgyIFMolBMLDRqBn teFoLtzBW2z+zFoW0b8ei50K9V2czPcvGYyLEAECEITGm8Oi3altl4WekDO1dgyXG7 16QYYq7R4tSPDdVbK33svtAKMHq+WNuEW8efV4vBUO8SpmT9mgUSydStIaCPmBCpPj uhiw+58YNza/bgBSIt79CYkCOe3UCN2FBnNrewpvsSxn2fbjY/k/GCu2sjguF8IrgX 7PpCmItI4yvAA== X-Virus-Scanned: Debian amavisd-new at emo07-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo07-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qnUSfthSzV16; Tue, 14 Nov 2023 18:02:58 +0000 (UTC) Received: from smtpclient.apple (unknown [165.140.184.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 99903648FB; Tue, 14 Nov 2023 18:02:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1699984978; bh=UIEI/BocAFywjY7w2jbDeoWGN+NWojpJ2g3y0/up3+4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=IYf0+CqnODKr374vhZ/fnTXDjMlf4sQkP2i06gGm7qMoiWDL0WRuNPC12lgwtnwwR SoboxFE/wTAlJQ7audbFp/59obwTbFEqc6vbbAd6vE2u8scpXgYlu8X3yFKWeAnuVe FR9+UJ/jeTkRpjNfzl1fItFy0pmLOrUPr7b/BWNLyACnos9ioYT2I9MLd5cne3pncS L6qOsV4RQLy7P/1DmQAGcPi1wmkv2cpqemKmSwrX4Wz8vv6+GpYBZ10CFV76e2WCj5 Z4W9NZwQgR5MPOL/0EjABlRNfG/FfohNc1N7dznfQMRsImmePu9y9Udae1LE5nuNSf NzcZBYJVjasGQ== Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: Dupe Key Violations in Logical Replication with PKs in Place From: Scott Ribe In-Reply-To: Date: Tue, 14 Nov 2023 11:02:47 -0700 Cc: pgsql-admin Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Don Seiler X-Mailer: Apple Mail (2.3774.200.91.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Nov 14, 2023, at 10:54=E2=80=AFAM, Don Seiler = wrote: >=20 > Well this looks to be human error/cause after all. I made the mistake = of announcing the upcoming migration and one eager developer connected = to the new/subscription DB and ran some inserts (also running them on = the old/publication DB). The inserts were all in one transaction, and = look to be responsible for all 3 of duplicate key incidents. So this would be about the 2 billionth or so episode in the DBA series = titled "shit happens" ;-) Glad you figured it out.=