Re: Boolean partitions syntax

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Mark Dilger <hornschnorter(at)gmail(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Boolean partitions syntax
Date: 2017-12-20 02:10:12
Message-ID: ada9217e-90ed-32ff-535e-a33155ef0c35@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)lab(dot)ntt(dot)co(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2017-12-20 02:28:26 Shouldn't execParallel.c null-terminate query_string in the parallel DSM?
Previous Message Mark Dilger 2017-12-20 02:07:49 Re: WIP: BRIN multi-range indexes