Skip to content

Fix test src/test/regress/expected/inherit_optimizer.out#2644

Merged
silent-observer merged 2 commits into
sync-14x-b13from
sync-14x-b13-michkov-23
Jun 8, 2026
Merged

Fix test src/test/regress/expected/inherit_optimizer.out#2644
silent-observer merged 2 commits into
sync-14x-b13from
sync-14x-b13-michkov-23

Conversation

@silent-observer

Copy link
Copy Markdown

There is one more issue in nodeModifyTable.c not fixed by commit
2bd01ef. Tuple routing should normally
be done at most once per tuple. ORCA forces tuple routing to be always
performed because of dynamic scans. However, INSERT part of split update
already does the routing, so we should ignore the forced routing to the
wrong partition in case of INSERTs. Also, the routing should only affect
the current partition for a single tuple, so resultRelInfo should not be
affected. Only update temporary routedResultRelInfo instead, if needed.
Also remove outdated assert.

There is one more issue in nodeModifyTable.c not fixed by commit
2bd01ef. Tuple routing should normally
be done at most once per tuple. ORCA forces tuple routing to be always
performed because of dynamic scans. However, INSERT part of split update
already does the routing, so we should ignore the forced routing to the
wrong partition in case of INSERTs. Also, the routing should only affect
the current partition for a single tuple, so resultRelInfo should not be
affected. Only update temporary routedResultRelInfo instead, if needed.
Comment thread src/backend/executor/nodeModifyTable.c Outdated
@silent-observer silent-observer merged commit 602ab3e into sync-14x-b13 Jun 8, 2026
1 check passed
@silent-observer silent-observer deleted the sync-14x-b13-michkov-23 branch June 8, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants