From: Christophe Pettus <xof@thebuild.com>
To: Robert Sjöblom <robert.sjoblom@fortnox.se>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Logical Replication Sync Validation
Date: Tue, 18 Apr 2023 03:48:49 -0700
Message-ID: <1D023CFA-64F5-45BA-B9BC-8985813040C2@thebuild.com> (raw)
In-Reply-To: <8ad28197-feb3-6db1-bff2-edb470e78bd1@fortnox.se>
References: <81990e48-56c3-21c5-7dcc-25725522c495@fortnox.se>
<469D4738-C6EE-4D3C-841A-0A0370364FB1@thebuild.com>
<8ad28197-feb3-6db1-bff2-edb470e78bd1@fortnox.se>
> 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, 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: xof@thebuild.com, robert.sjoblom@fortnox.se
Subject: Re: Logical Replication Sync Validation
In-Reply-To: <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> <1D023CFA-64F5-45BA-B9BC-8985813040C2@thebuild.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox