RE: Problem with default partition pruning

From: "Yuzuko Hosoya" <hosoya(dot)yuzuko(at)lab(dot)ntt(dot)co(dot)jp>
To: "'Amit Langote'" <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, "'Thibaut Madelaine'" <thibaut(dot)madelaine(at)dalibo(dot)com>, "'Imai, Yoshikazu'" <imai(dot)yoshikazu(at)jp(dot)fujitsu(dot)com>
Cc: "'PostgreSQL Hackers'" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: Problem with default partition pruning
Date: 2019-03-25 02:03:05
Message-ID: 005801d4e2ae$e29e5080$a7daf180$@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

>
> Hi,
>
> On 2019/03/23 2:36, Thibaut Madelaine wrote:
> > I tested your last patch and if I didn't mix up patches on the end of
> > a too long week, I get a problem when querying the sub-sub partition:
> >
> > test=# explain select * from test2_0_10 where id = 25;
> > QUERY PLAN
> > ------------------------------------------------------------
> > Seq Scan on test2_0_10 (cost=0.00..25.88 rows=6 width=36)
> > Filter: (id = 25)
> > (2 rows)
>
> The problem here is not really related to partition pruning, but another problem I recently sent an
> email about:
>
> https://www.postgresql.org/message-id/9813f079-f16b-61c8-9ab7-4363cab28d80%40lab.ntt.co.jp
>
> The problem in this case is that *constraint exclusion* is not working, because partition constraint
> is not loaded by the planner. Note that pruning is only used if a query specifies the parent table,
> not a partition.

Thanks for the comments.

I saw that email. Also, I checked that query Thibaut mentioned worked
correctly with Amit's patch discussed in that thread.

Best regards,
Yuzuko Hosoya

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ideriha, Takeshi 2019-03-25 02:03:37 RE: Protect syscache from bloating with negative cache entries
Previous Message Chapman Flack 2019-03-25 01:49:31 Re: Fix XML handling with DOCTYPE