public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dilip Kumar <[email protected]>
To: [email protected] <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: [BUG]Update Toast data failure in logical replication
Date: Tue, 1 Jun 2021 15:39:25 +0530
Message-ID: <CAFiTN-ujnvSnzgAv5KLdAaGc8-CQh-U85vYAQOkadN2pejTK4w@mail.gmail.com> (raw)
In-Reply-To: <OS0PR01MB6113D89BA71E6E1439073E69FB3E9@OS0PR01MB6113.jpnprd01.prod.outlook.com>
References: <OS0PR01MB611342D0A92D4F4BF26C0F47FB229@OS0PR01MB6113.jpnprd01.prod.outlook.com>
<OS0PR01MB61131DF0574EEFFECC157555FB229@OS0PR01MB6113.jpnprd01.prod.outlook.com>
<OS0PR01MB6113D49D3AE7F0CA59679DA4FB229@OS0PR01MB6113.jpnprd01.prod.outlook.com>
<CAFiTN-ve8w3NY89vYi9ck8HMMXjLc=2YTU+ZCoQZ_f2C-7oXhg@mail.gmail.com>
<OS0PR01MB6113F5E14AFD98EF6B3B85CCFB3F9@OS0PR01MB6113.jpnprd01.prod.outlook.com>
<CAFiTN-v-LSyGqu5AfJDjfGZup_Gp37dgzukPEhUUsAqy9RT7_A@mail.gmail.com>
<CAFiTN-tir1MJUBaUSdspOJZZZXbZgzufwr8rpaXR2KZ0HBe8OA@mail.gmail.com>
<OS0PR01MB61137DE0A63EC2AD65CFB35AFB3F9@OS0PR01MB6113.jpnprd01.prod.outlook.com>
<CAFiTN-uS0UhHN0juRjjWA1aDMybnvNfqNtVbSQdap_1g6W_nGQ@mail.gmail.com>
<OS0PR01MB6113D89BA71E6E1439073E69FB3E9@OS0PR01MB6113.jpnprd01.prod.outlook.com>
On Tue, Jun 1, 2021 at 12:29 PM [email protected]
<[email protected]> wrote:
>
> Hi
>
>
>
> I have some questions with your patch. Here are two cases I used to check the bug.
>
>
>
> Case1(PK toasted_key is short), data could be synchronized on HEAD.
>
> ---------------
>
> INSERT INTO toasted_key(toasted_key, toasted_col1) VALUES('111', repeat('9876543210', 200));
>
> UPDATE toasted_key SET toasted_col2 = toasted_col1;
>
> ---------------
>
>
>
> Case2(PK toasted_key is very long), data couldn’t be synchronized on HEAD.(which is the bug)
>
> ---------------
>
> INSERT INTO toasted_key(toasted_key, toasted_col1) VALUES(repeat('9876543210', 200), '111');
>
> UPDATE toasted_key SET toasted_col2 = toasted_col1;
>
> ---------------
>
>
>
> So I think the bug is only related with the length of primary key.
>
> I noticed that in case1, ExtractReplicaIdentity function returned NULL on HEAD. But after your fix, it didn’t return NULL. There is no problem with this case on HEAD, but the patch modified its return value. I’m not sure if it would bring new problems. Have you checked it?
Good observation, basically, my check says that any field in the tuple
is toasted then prepare the key tuple, actually, after that, I should
recheck whether the key field specifically toasted or not and if it is
not then we can continue returning NULL. I will fix this in the next
version.
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
view thread (31+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [BUG]Update Toast data failure in logical replication
In-Reply-To: <CAFiTN-ujnvSnzgAv5KLdAaGc8-CQh-U85vYAQOkadN2pejTK4w@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox