On Mon, Jul 20, 2026 at 6:17 AM Chao Li <li.evan.chao@gmail.com> wrote:
>
> Okay. We cannot simply check node->forPortionOf to bypass RETURNING processing, because an FPO update on a
partitionedtable may move a row to a different partition. In that case, ExecInsert() is also called to insert the row
intothe new partition.
>
> However, in that case, mtstate->operation is still CMD_UPDATE, while for leftover rows, mtstate->operation is
temporarilychanged 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 ~{:-)
pj@illuminatedcomputing.com