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

From Tsunakawa, Takayuki
Subject RE: [RFC] [PATCH] Flexible "partition pruning" hook
Date
Msg-id 0A3221C70F24FB45833433255569204D1FBB5413@G01JPEXMBYT05
Whole thread Raw
In response to [RFC] [PATCH] Flexible "partition pruning" hook  (Mike Palmiotto <mike.palmiotto@crunchydata.com>)
Responses Re: [RFC] [PATCH] Flexible "partition pruning" hook  (Michael Paquier <michael@paquier.xyz>)
Re: [RFC] [PATCH] Flexible "partition pruning" hook  (Mike Palmiotto <mike.palmiotto@crunchydata.com>)
List pgsql-hackers
From: Mike Palmiotto [mailto:mike.palmiotto@crunchydata.com]
> 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.

What concrete problems would you expect this patch to solve?  What kind of extensions do you imagine?  I'd like to hear
aboutthe examples.  For example, "PostgreSQL 12 will not be able to filter out enough partitions when
planning/executingSELECT ... WHERE ... statement.  But an extension like this can extract just one partition early."
 

Would this help the following issues with PostgreSQL 12?

* UPDATE/DELETE planning takes time in proportion to the number of partitions, even when the actually accessed
partitionduring query execution is only one.
 

* Making a generic plan takes prohibitably long time (IIRC, about 12 seconds when the number of partitoons is 1,000 or
8,000.)


Regards
Takayuki Tsunakawa






pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: Remove Deprecated Exclusive Backup Mode
Next
From: "Nagaura, Ryohei"
Date:
Subject: inted RE: Timeout parameters