Re: [HACKERS] Runtime Partition Pruning
Beena Emerson <memissemerson@gmail.com>
From: Beena Emerson <memissemerson@gmail.com>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>,
Robert Haas <robertmhaas@gmail.com>, amul sul <sulamul@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Dilip Kumar <dilipbalaut@gmail.com>
Date: 2017-12-19T08:54:26Z
Lists: pgsql-hackers
Attachments
- 0001-Implement-runtime-partiton-pruning_v7_WIP.patch (application/octet-stream) patch v7-0001
Hello, On Mon, Dec 18, 2017 at 4:03 PM, David Rowley <david.rowley@2ndquadrant.com> wrote: > >> We could do something similar here using a similar code structure. Maybe, >> add a ExecSetupPartitionRuntimePruning() in execPartition.c (mimicking >> ExecSetupPartitionTupleRouting), that accepts AppendState node. >> Furthermore, it might be a good idea to have something similar to >> ExecFindPartition(), say, ExecGetPartitions(). That is, we have new >> functions for run-time pruning that are counterparts to corresponding >> functions for tuple routing. > > Seems to me in this case we're better to build this structure during > planning and save it with the plan so that it can be used over and > over, rather than building it again and again each time the plan is > executed. Likely a common use case for run-time pruning is when the > plan is going to be used multiple times with different parameters, so > we really don't want to repeat any work that we don't have to here. > I agree. It would be better to avoid building the structure during execution. PFA the updated patch. -- Beena Emerson EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
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