Re: BUG #18103: bugs of concurrent merge into when use different join plan

Dean Rasheed <dean.a.rasheed@gmail.com>

From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: Richard Guo <guofenglinux@gmail.com>
Cc: David Rowley <dgrowleyml@gmail.com>, luajk@qq.com, pgsql-bugs@lists.postgresql.org, Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2023-09-27T07:29:27Z
Lists: pgsql-bugs
On Tue, 26 Sept 2023 at 10:46, Richard Guo <guofenglinux@gmail.com> wrote:
>
> Agreed.  We need rowmarks for MERGE too.  I found that the following
> comment from plannodes.h is very useful in understanding this.
>
> * When doing UPDATE, DELETE, or SELECT FOR UPDATE/SHARE, we have to uniquely
> * identify all the source rows, not only those from the target relations, so
> * that we can perform EvalPlanQual rechecking at need.
>

Ah, good. Thanks. That confirms my understanding.

> To nitpick, there are some comments that may need to be updated to
> include MERGE, such as the comments for ExecRowMark, RowMarkType and
> PlanRowMark.
>

Agreed. I'll see about doing that.

Regards,
Dean



Commits

  1. Fix EvalPlanQual rechecking during MERGE.