PG18: fix query results diff in merge regress test.

The test used SQL functions which can be cached in PG18+ since
commit 0dca5d68d. This means that a Citus distributed plan can
be cached, but the copy function for a distributed plan did not
include the `sourceResultRepartitionColumnIndex` field, which is
critical for MERGE queries. Including it fixes the diff problem.
Also update `OutDistributedPlan()` function so that the field is
picked up by `nodeToString()`.
colm/PG18-merge-main
Colm McHugh 2025-11-06 12:07:01 +00:00
parent b10aa02908
commit 5de665814b
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(numberOfTimesExecuted);
COPY_NODE_FIELD(planningError);
COPY_SCALAR_FIELD(sourceResultRepartitionColumnIndex);
}

View File

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