Re: [HACKERS] Runtime Partition Pruning
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>, Beena Emerson <memissemerson@gmail.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>, Robert Haas <robertmhaas@gmail.com>, amul sul <sulamul@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Dilip Kumar <dilipbalaut@gmail.com>
Date: 2018-03-01T13:04:41Z
Lists: pgsql-hackers
Attachments
- v14-0001-Add-bms_prev_member-function.patch (application/octet-stream) patch v14-0001
- v14-0002-Extract-code-to-build-partition-expressions-into.patch (application/octet-stream) patch v14-0002
- v14-0003-Provide-infrastructure-to-allow-partition-prunin.patch (application/octet-stream) patch v14-0003
- v14-0004-Allow-Append-subnodes-to-be-pruned-during-execut.patch (application/octet-stream) patch v14-0004
- v14-0005-Allow-MergeAppend-s-subnodes-to-be-pruned-during.patch (application/octet-stream) patch v14-0005
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
Commits
-
Initialize ExprStates once in run-time partition pruning
- 1957f8dabf8d 11.0 landed
-
Add bms_prev_member function
- 5c0675215e15 11.0 landed
-
Support partition pruning at execution time
- 499be013de65 11.0 landed
-
Document partprune.c a little better
- 971d7ddbe19a 11.0 landed
-
Fix crash in pg_replication_slot_advance
- 6f1d723b6359 11.0 cited
-
Add parallel-aware hash joins.
- 1804284042e6 11.0 cited
-
Fix typo.
- 487a0c1518af 11.0 cited
-
Allow --with-bonjour to work with non-macOS implementations of Bonjour.
- 9b9cb3c4534d 11.0 cited
-
Mention need for --no-inc-recursive in rsync command
- 2c74e6c1dcc5 11.0 cited