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 1poiuQ-0001LH-7j for pgsql-general@arkaria.postgresql.org; Tue, 18 Apr 2023 10:50:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1poiuO-0001P1-Uc for pgsql-general@arkaria.postgresql.org; Tue, 18 Apr 2023 10:50:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1poiuO-0001Or-Jq for pgsql-general@lists.postgresql.org; Tue, 18 Apr 2023 10:50:00 +0000 Received: from smtp96.iad3b.emailsrvr.com ([146.20.161.96]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1poiuH-000UDv-Og for pgsql-general@lists.postgresql.org; Tue, 18 Apr 2023 10:49:59 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp13.relay.iad3b.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 9F8F7600EA; Tue, 18 Apr 2023 06:49:51 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Logical Replication Sync Validation From: Christophe Pettus In-Reply-To: <8ad28197-feb3-6db1-bff2-edb470e78bd1@fortnox.se> Date: Tue, 18 Apr 2023 03:48:49 -0700 Cc: pgsql-general Content-Transfer-Encoding: quoted-printable Message-Id: <1D023CFA-64F5-45BA-B9BC-8985813040C2@thebuild.com> References: <81990e48-56c3-21c5-7dcc-25725522c495@fortnox.se> <469D4738-C6EE-4D3C-841A-0A0370364FB1@thebuild.com> <8ad28197-feb3-6db1-bff2-edb470e78bd1@fortnox.se> To: =?utf-8?Q?Robert_Sj=C3=B6blom?= X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Classification-ID: 95cc85c3-cb09-4ca8-96fd-7dcbe88fa923-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Apr 18, 2023, at 03:45, Robert Sj=C3=B6blom = wrote: > I'm aware of that. But you can, however, do something like: >=20 > SELECT * FROM FOO WHERE CTID =3D (SELECT MAX(CTID) FROM FOO); >=20 > on both sides. The idea being that if I change FOO, the CTID of the = changed row will not be the same on both sides, but the CTID will point = to the changed row on both sides. Or am I not understanding it = correctly? CTIDs are not monotonically increasing; they're locator in the file that = holds the table data. There's no reason to believe that a record on the = subscriber will happen to land in any particular position.=