| 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>, Masahiko Sawada <sawada(dot)mshk(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> |
| Subject: | RE: Logical replication row filter loses unchanged toasted columns |
| Date: | 2026-08-25 10:15:40 |
| Message-ID: | OSOPR01MB12153C1336B130E7CB49F0962F5AF2@OSOPR01MB12153.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Dear Hou,
> Here is the patch (on HEAD) for the suggested approach. I extended
> extractReplicaIdentity
> to also extract unchanged toasted columns, as it fits best there, we only need
> to log unchanged toast columns when the replica identity changes.
Thanks for posting the patch.
I cannot find any the conceptual issues. I considered the alternative that new
tuple can have un-changed toasted values, but it seems not good for the crash
recovery: the code uses the tuple in the WAL as-is, so we should have the pointer
to the toast table. Few small comments:
```
+#include "catalog/pg_publication.h"
```
I could compile the code without the inclusion, maybe because we use
RelationHasPubRowFilterForUpdate() to obtain the rf_exists_for_update.
```
+ * to protect unchanged, non-replica-identity, TOASTed column values that
```
Not sure the term "protect" correct. How about "preserve"? Because we try to keep
the toast value on the memory in heap_update().
Best regards,
Hayato Kuroda
FUJITSU LIMITED
| From | Date | Subject | |
|---|---|---|---|
| Next Message | prankware | 2026-08-25 10:23:15 | Re: COALESCE patch |
| Previous Message | shveta malik | 2026-08-25 10:06:53 | Re: Support EXCEPT for TABLES IN SCHEMA publications |