Re: Logical Replication Sync Validation - Mailing list pgsql-general

From Christophe Pettus
Subject Re: Logical Replication Sync Validation
Date
Msg-id 1D023CFA-64F5-45BA-B9BC-8985813040C2@thebuild.com
Whole thread Raw
In response to Logical Replication Sync Validation  (Robert Sjöblom <robert.sjoblom@fortnox.se>)
List pgsql-general

> On Apr 18, 2023, at 03:45, Robert Sjöblom <robert.sjoblom@fortnox.se> wrote:
> I'm aware of that. But you can, however, do something like:
>
> SELECT * FROM FOO WHERE CTID = (SELECT MAX(CTID) FROM FOO);
>
> 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,
butthe 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
believethat a record on the subscriber will happen to land in any particular position. 


pgsql-general by date:

Previous
From: John Howroyd
Date:
Subject: Re: Guidance on INSERT RETURNING order
Next
From: Adrian Klaver
Date:
Subject: Re: Request for information about postgres version 15.2 stability