From: | "Euler Taveira" <euler(at)eulerto(dot)com> |
---|---|
To: | "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com>, "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | "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 01:46:33 |
Message-ID: | ec368900-6f29-492c-838a-da6093eef932@www.fastmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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. It complicates a non-critical path. In
general, the condition will be executed once or twice.
--
Euler Taveira
EDB https://www.enterprisedb.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-02-09 01:53:59 | Re: pgsql: Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURR |
Previous Message | Andres Freund | 2022-02-09 01:43:34 | Re: pgsql: Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURR |