mirror of
https://github.com/postgres/postgres.git
synced 2025-11-01 21:31:19 +03:00
Expand run-time partition pruning to work with MergeAppend
This expands the support for the run-time partition pruning which was added
for Append in 499be013de to also allow unneeded subnodes of a MergeAppend
to be removed.
Author: David Rowley
Discussion: https://www.postgresql.org/message-id/CAKJS1f_F_V8D7Wu-HVdnH7zCUxhoGK8XhLLtd%3DCu85qDZzXrgg%40mail.gmail.com
This commit is contained in:
@@ -273,6 +273,7 @@ _copyMergeAppend(const MergeAppend *from)
|
||||
COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
|
||||
COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
|
||||
COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
|
||||
COPY_NODE_FIELD(part_prune_infos);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
@@ -434,6 +434,8 @@ _outMergeAppend(StringInfo str, const MergeAppend *node)
|
||||
appendStringInfoString(str, " :nullsFirst");
|
||||
for (i = 0; i < node->numCols; i++)
|
||||
appendStringInfo(str, " %s", booltostr(node->nullsFirst[i]));
|
||||
|
||||
WRITE_NODE_FIELD(part_prune_infos);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -1634,6 +1634,7 @@ _readMergeAppend(void)
|
||||
READ_OID_ARRAY(sortOperators, local_node->numCols);
|
||||
READ_OID_ARRAY(collations, local_node->numCols);
|
||||
READ_BOOL_ARRAY(nullsFirst, local_node->numCols);
|
||||
READ_NODE_FIELD(part_prune_infos);
|
||||
|
||||
READ_DONE();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user