RE: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL - Mailing list pgsql-hackers

From shiy.fnst@fujitsu.com
Subject RE: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL
Date
Msg-id OSZPR01MB6310CE109F65A9B62A25CE1EFDB99@OSZPR01MB6310.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL  (Önder Kalacı <onderkalaci@gmail.com>)
Responses Re: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL
List pgsql-hackers
On Sun, Mar 12, 2023 4:00 AM Önder Kalacı <onderkalaci@gmail.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

pgsql-hackers by date:

Previous
From: Önder Kalacı
Date:
Subject: Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Next
From: Amit Kapila
Date:
Subject: Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher