Re: SEGFAULT on a concurrent UPDATE of mix of local and foreign partitions

Heikki Linnakangas <hlinnaka@iki.fi>

From: Heikki Linnakangas <hlinnaka@iki.fi>
To: "Andrey V. Lepikhov" <a.lepikhov@postgrespro.ru>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>, Amit Langote <amitlangote09@gmail.com>
Date: 2021-08-12T08:38:42Z
Lists: pgsql-bugs
On 10/08/2021 12:18, Andrey V. Lepikhov wrote:
> On 8/10/21 1:29 AM, Heikki Linnakangas wrote:
>> Does it ever make sense to re-evaluate a direct Foreign Update as part
>> of EvalPlanQual? It doesn't seem sane to me, you cannot just run an
>> UPDATE statement again and expect it to be idempotent. So I think it
>> would make sense skip this during EvalPlanQual processing altogether.
>> And no need to call the FDW's Begin/EndDirectModify functions either.
> Agree. It is my first dive into the EPQ code. After studying i think
> this makes no sense.

Pushed the fix to master and v14. Thanks for the report!

- Heikki



Commits

  1. Fix segfault during EvalPlanQual with mix of local and foreign partitions.

  2. Create ResultRelInfos later in InitPlan, index them by RT index.