RE: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL

From: "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>
To: Önder Kalacı <onderkalaci(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: RE: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL
Date: 2023-03-13 10:53:03
Message-ID: OSZPR01MB6310CE109F65A9B62A25CE1EFDB99@OSZPR01MB6310.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 12, 2023 4:00 AM Önder Kalacı <onderkalaci(at)gmail(dot)com> wrote:
>
> Attaching a patch that could possibly solve the problem.
>

Thanks for your patch. I tried it and it worked well.
Here are some minor comments.

1.
@@ -243,6 +243,17 @@ tuples_equal(TupleTableSlot *slot1, TupleTableSlot *slot2,
Form_pg_attribute att;
TypeCacheEntry *typentry;

+
+ Form_pg_attribute attr = TupleDescAttr(slot1->tts_tupleDescriptor, attrnum);
+

I think we can use "att" instead of a new variable. They have the same value.

2.
+# The bug was that when when the REPLICA IDENTITY FULL is used with dropped

There is an extra "when".

Regards,
Shi Yu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-03-13 11:48:13 Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Previous Message Önder Kalacı 2023-03-13 10:51:00 Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher