Re: [RFC] [PATCH] Flexible "partition pruning" hook - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [RFC] [PATCH] Flexible "partition pruning" hook
Date
Msg-id 20190226073702.GJ27822@paquier.xyz
Whole thread Raw
In response to RE: [RFC] [PATCH] Flexible "partition pruning" hook  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
List pgsql-hackers
On Tue, Feb 26, 2019 at 06:55:30AM +0000, Tsunakawa, Takayuki wrote:
> What concrete problems would you expect this patch to solve?  What
> kind of extensions do you imagine?  I'd like to hear about the
> examples.  For example, "PostgreSQL 12 will not be able to filter
> out enough partitions when planning/executing SELECT ... WHERE
> ... statement.  But an extension like this can extract just one
> partition early."

Indeed.  Hooks should be defined so as their use is as generic and
possible depending on their context, particularly since there is a
planner hook..  It is also important to consider first if the existing
core code can be made better depending on the requirements, removing
the need for a hook at the end.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Unused parameters & co in code
Next
From: Masahiko Sawada
Date:
Subject: Re: reloption to prevent VACUUM from truncating empty pages at theend of relation