I've attached v14 of the patch.
This is based on Amit's faster partition pruning patch v35 [1]
There's quite a bit of code churn in this version from the last
version. I've now moved most of the run-time pruning code into
execPartition.c and aimed to make it more generic to apply to node
types other than Append. I also had to make a few changes to the
PartitionPruneInfo node type so that it could get some support in
readfuncs.c and outfuncs.c, which I had previously missed. As proof
that the code in execPartition.c is fairly generic and applies to any
subnode type that supports a List of subnodes, I went ahead and wrote
a small additional patch to add support for run-time pruning for
MergeAppend. This just takes an extra 100 lines of code.
I've also split the patch out a bit more into logical parts in the
hope it makes things easier to review.
[1] https://www.postgresql.org/message-id/0f96dd16-f5d5-7301-4ddf-858d41a6cbe3@lab.ntt.co.jp
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services