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
