PG18: fix query results diff in merge regress test. (#8323)

The `merge` regress test uses SQL functions which can be cached in PG18+
since commit
[0dca5d68d](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=0dca5d68d7bebf2c1036fd84875533afef6df992).
Distributed plan's copy function did not include the
`sourceResultRepartitionColumnIndex` field, which is critical for MERGE
queries, and for cached distributed plans this field was always 0
leading to the problem (#8285). Ensuring it is copied fixes it. This was
an oversight in Citus, and not specific to PG18.
pull/8192/merge
Colm 2025-11-06 12:31:43 +00:00 committed by GitHub
parent b10aa02908
commit bc41e7b94f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -137,6 +137,8 @@ CopyNodeDistributedPlan(COPYFUNC_ARGS)
COPY_SCALAR_FIELD(fastPathRouterPlan); COPY_SCALAR_FIELD(fastPathRouterPlan);
COPY_SCALAR_FIELD(numberOfTimesExecuted); COPY_SCALAR_FIELD(numberOfTimesExecuted);
COPY_NODE_FIELD(planningError); COPY_NODE_FIELD(planningError);
COPY_SCALAR_FIELD(sourceResultRepartitionColumnIndex);
} }

View File

@ -203,6 +203,7 @@ OutDistributedPlan(OUTFUNC_ARGS)
WRITE_UINT_FIELD(numberOfTimesExecuted); WRITE_UINT_FIELD(numberOfTimesExecuted);
WRITE_NODE_FIELD(planningError); WRITE_NODE_FIELD(planningError);
WRITE_INT_FIELD(sourceResultRepartitionColumnIndex);
} }