Re: making tid and HOTness of UPDATE available to logical decoding plugins - Mailing list pgsql-hackers

From Matthias van de Meent
Subject Re: making tid and HOTness of UPDATE available to logical decoding plugins
Date
Msg-id CAEze2WgDfehJrK_JOQ9kzx4+9LR3TSqAUgXVg3wEXFJayzx2rQ@mail.gmail.com
Whole thread Raw
In response to making tid and HOTness of UPDATE available to logical decoding plugins  (Hannu Krosing <hannuk@google.com>)
List pgsql-hackers
On Thu, 4 Dec 2025 at 21:58, Hannu Krosing <hannuk@google.com> wrote:
>
> Please find attached a patch that makes tuple ids and info about
> weather it was plain or HOT update available to logical decoding
> callbacks.
>
> Also modified test_decoding to show both tids -
> - old tid has format -(pageno, slot)
> - new tid has format +(pageno, slot)
> if it is a HOT update, it is decoded prefixed with 'HOT '

I don't think this added information has meaning in a logical database
framework; I see only demerits in adding this. No query reaches for
tuples by TID unless the query concerns the physical layout of the
data, in which case it isn't a logical query anymore.

One more concern about this is that this may require significant
additional effort in CLUSTER/REPACK -related operations, as those
operations rewrite which TIDs are associated with any logical tuple.
Currently, this never requires a rewrite of the remote table, but by
effectively exposing the TID as addressable column that change must be
considered a possible update of the remote values, and thus requires
logical processing; increasing the cost of those operations in
logical-enabled databases by a huge margin.

Kind regards,

Matthias van de Meent
Databricks (https://www.databricks.com)



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: POC: make mxidoff 64 bits
Next
From: Amit Langote
Date:
Subject: Re: index prefetching