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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Euler Taveira <euler(at)eulerto(dot)com>
Cc: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Petr Jelinek <petr(dot)jelinek(at)enterprisedb(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUG]Update Toast data failure in logical replication
Date: 2022-02-09 02:24:35
Message-ID: CAA4eK1+cST+yKWfnHW+rNXeey9Lup+hmh2OO0xpBMHDhfw7bFg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 9, 2022 at 7:16 AM Euler Taveira <euler(at)eulerto(dot)com> wrote:
>
> On Tue, Feb 8, 2022, at 10:18 PM, tanghy(dot)fnst(at)fujitsu(dot)com wrote:
>
> 2)
> + /*
> + * Check if the old tuple's attribute is stored externally and is a
> + * member of external_cols.
> + */
> + if (VARATT_IS_EXTERNAL((struct varlena *) DatumGetPointer(value1)) &&
> + bms_is_member(attrnum - FirstLowInvalidHeapAttributeNumber,
> + external_cols))
> + *has_external = true;
>
> If has_external is already true, it seems we don't need this check, so should we
> check has_external first?
>
> Is it worth it? I don't think so.
>

I also don't think it is worth adding such a check.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-02-09 02:38:17 Re: make MaxBackends available in _PG_init
Previous Message Michael Paquier 2022-02-09 02:24:21 Re: pgsql: Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURR