On Mon, Jul 20, 2026 at 6:17 AM Chao Li <[email protected]> wrote:
>
> Okay. We cannot simply check node->forPortionOf to bypass RETURNING
> processing, because an FPO update on a partitioned table may move a row to a
> different partition. In that case, ExecInsert() is also called to insert the
> row into the new partition.
>
> However, in that case, mtstate->operation is still CMD_UPDATE, while for
> leftover rows, mtstate->operation is temporarily changed to CMD_INSERT. So we
> can check both node->forPortionOf and mtstate->operation.
>
> PFA v2 with the new implementation. I tried to run check-world and it passed.
Nice catch. I took a look at the v2 patch. It looks like a good fix to
me. I'm happy that we're testing cross-partition updates as well.
Thanks for the quick fix!
Yours,
--
Paul ~{:-)
[email protected]