Re: BUG #18238: Cross-partitition MERGE/UPDATE with delete-preventing trigger leads to incorrect memory access

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Richard Guo <guofenglinux(at)gmail(dot)com>, exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18238: Cross-partitition MERGE/UPDATE with delete-preventing trigger leads to incorrect memory access
Date: 2023-12-21 13:26:34
Message-ID: CAEZATCUHSyk0U=r_jM1gcLscjopgsmTojxvATro9ZfncPsfPjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 13 Dec 2023 at 03:36, jian he <jian(dot)universality(at)gmail(dot)com> wrote:
>
> your patch is correct, especially ExecCrossPartitionUpdate canSetTag
> logic is very intuitive to me.
>

Thanks for checking. Patch pushed and back-patched.

> +SELECT * FROM pa_target ORDER BY tid;
> I would change to
>
> SELECT pt.*, pg_get_expr(pc.relpartbound, pt.tableoid, TRUE)
> FROM pa_target pt
> JOIN pg_class pc ON pc.oid = pt.tableoid
> ORDER BY val,tid;
>
> that would make the result more understandable, maybe i am over engineering.
> Anyway, that's my personal preference.

I decided not to do that, just to keep it simpler, and consistent with
the preceding tests.

Regards,
Dean

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2023-12-21 14:00:01 BUG #18256: spgGetCache() attempts to read to read invalid file for index attached to partitioned table
Previous Message PG Bug reporting form 2023-12-21 11:11:18 BUG #18255: I am unable to deselect the stack bulider when i was install the postgresql