Re: Boolean partitions syntax - Mailing list pgsql-hackers

From Amit Langote
Subject Re: Boolean partitions syntax
Date
Msg-id ada9217e-90ed-32ff-535e-a33155ef0c35@lab.ntt.co.jp
Whole thread Raw
In response to Re: Boolean partitions syntax  (Mark Dilger <hornschnorter@gmail.com>)
Responses Re: Boolean partitions syntax
List pgsql-hackers
Hi Mark,

On 2017/12/20 6:46, Mark Dilger wrote:
>> On Dec 12, 2017, at 10:32 PM, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>> Added to CF: https://commitfest.postgresql.org/16/1410/
> 
> This compiles and passes the regression tests for me.

Thanks for the review.

> I extended your test a bit to check whether partitions over booleans are useful.
> Note specifically the 'explain' output, which does not seem to restrict the scan
> to just the relevant partitions.  You could easily argue that this is beyond the scope
> of your patch (and therefore not your problem), but I doubt it makes much sense
> to have boolean partitions without planner support for skipping partitions like is
> done for tables partitioned over other data types.

Yeah.  Actually, I'm aware that the planner doesn't work this.  While
constraint exclusion (planner's current method of skipping partitions)
does not work with IS TRUE/FALSE/UNKNOWN clauses, the new partition
pruning patch [1] addresses that.  In fact, I started this thread prompted
by some discussion about Boolean partitions on that thread [2].

That said, someone might argue that we should also fix constraint
exclusion (the current method of partition pruning) so that partition
skipping works correctly for Boolean partitions.

Thanks,
Amit

[1] https://commitfest.postgresql.org/15/1272/

[2]
https://www.postgresql.org/message-id/9b98fc47-34b8-0ab6-27fc-c8a0889f2e5b%40lab.ntt.co.jp



pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: WIP: BRIN multi-range indexes
Next
From: Thomas Munro
Date:
Subject: Shouldn't execParallel.c null-terminate query_string in the parallel DSM?