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

From Mike Palmiotto
Subject [RFC] [PATCH] Flexible "partition pruning" hook
Date
Msg-id CAMN686HzMrb5oPJN4hTqFYE1+3BJb3k__Ks+-q0c-q3k_wVveA@mail.gmail.com
Whole thread Raw
Responses RE: [RFC] [PATCH] Flexible "partition pruning" hook  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
List pgsql-hackers
Greetings,

Attached is a patch which attempts to solve a few problems:

1) Filtering out partitions flexibly based on the results of an
external function call (supplied by an extension).
2) Filtering out partitions from pg_inherits based on the same function call.
3) Filtering out partitions from a partitioned table BEFORE the partition
is actually opened on-disk.

The name "partitionChildAccess_hook" comes from the fact that the
backend may not have access to a particular partition within the
partitioned table. The idea would be to silently filter out the
partition from queries to the parent table, which means also adjusting
the returned contents of find_inheritance_children based on the
external function.

I am curious how the community feels about these patches and if there
is an alternative approach to solve the above issues (perhaps
another existing hook).

Thanks for your time.

-- 
Mike Palmiotto
Software Engineer
Crunchy Data Solutions
https://crunchydata.com

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: POC: converting Lists into arrays
Next
From: Andres Freund
Date:
Subject: Re: POC: converting Lists into arrays