Re: [BUG]Update Toast data failure in logical replication

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUG]Update Toast data failure in logical replication
Date: 2021-05-31 10:09:01
Message-ID: CAFiTN-uS0UhHN0juRjjWA1aDMybnvNfqNtVbSQdap_1g6W_nGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 31 May 2021 at 3:33 PM, tanghy(dot)fnst(at)fujitsu(dot)com <
tanghy(dot)fnst(at)fujitsu(dot)com> wrote:

> On Mon, May 31, 2021 5:12 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> >
> > The problem is if the key attribute is not changed we don't log it as
> > it should get logged along with the updated tuple, but if it is
> > externally stored then the complete key will never be logged because
> > there is no log from the toast table. For fixing this if the key is
> > externally stored then always log that.
> >
> > Please test with the attached patch.
>
> Thanks for your patch. I tested it and the bug was fixed.
>

Thanks for confirming this.

> I'm still trying to understand your fix, please allow me to ask more(maybe
> silly) questions if I found any.
>
> + * if the key hasn't changedand we're only logging the key, we're
> done.
>
> I think "changedand" should be "changed and".
>

Okay, I will fix it. Lets see what others have to say about this fix, if
we agree with this then I think we might have to change the test output. I
will do that in the next version along with your comment fix.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2021-05-31 10:59:51 Re: Decoding speculative insert with toast leaks memory
Previous Message tanghy.fnst@fujitsu.com 2021-05-31 10:03:54 RE: [BUG]Update Toast data failure in logical replication