| From: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
|---|---|
| To: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
| Cc: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Subject: | RE: Logical replication row filter loses unchanged toasted columns |
| Date: | 2026-08-27 04:13:46 |
| Message-ID: | OS9PR01MB12149A8BE71B8C9E29A9C8CC1F5AD2@OS9PR01MB12149.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
> Thanks for the comments. They look good to me and I have addressed them
> in V4 patch.
Thanks for updating the patch. I have few more cosmetic comments.
01. BuildOldKeyTuple
```
- * Build a heap tuple representing the configured REPLICA IDENTITY to represent
- * the old tuple in an UPDATE or DELETE.
+ * Build the old-key tuple to be WAL-logged for an UPDATE or DELETE, holding
+ * the old tuple's replica identity column values (or the whole old tuple,
+ * flattened, for REPLICA IDENTITY FULL).
```
Should we also clarify that non-RI can be included? Like:
```
* Build the old-key tuple to be WAL-logged for an UPDATE or DELETE, holding
* the old tuple's replica identity column values (and some row-filtered
* UPDATEs, unchanged out-of-line ones). For REPLICA IDENTITY FULL, this will
* be the whole old tuple flattened.
```
02. BuildOldKeyTuple
```
/*
* Construct a new tuple containing only the replica identity columns,
* with nulls elsewhere. While we're at it, assert that the replica
* identity columns aren't null.
*/
heap_deform_tuple(tp, desc, values, nulls);
```
I think this comment should be updated because unchanged toasted columns can be
also included. Idea:
```
/*
* Construct a new tuple containing the replica identity columns, and when
* requested, unchanged non-replica-identity columns with external values.
* All other columns are null. While we're at it, assert that the replica
* identity columns aren't null.
*/
```
Best regards,
Hayato Kuroda
FUJITSU LIMITED
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Gabriele Bartolini | 2026-08-27 04:54:51 | Re: Tracking role modification timestamps in pg_authid / pg_roles |
| Previous Message | Denis Smirnov | 2026-08-27 03:49:42 | Re: [Proposal] add portaddr like hostaddr |