Re: Problem with default partition pruning - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Problem with default partition pruning
Date
Msg-id 20190805143920.GA6232@alvherre.pgsql
Whole thread Raw
In response to Re: Problem with default partition pruning  (yuzuko <yuzukohosoya@gmail.com>)
Responses Re: Problem with default partition pruning  (Amit Langote <amitlangote09@gmail.com>)
Re: Problem with default partition pruning  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 2019-Aug-05, yuzuko wrote:

> So I proposed moving the if() block to the current place.
> The latest patch can solve both queries but I found the latter
> problem can be solved by setting constraint_exclusion = on.

So we have three locations for that test; one is where it currently is,
which handles a small subset of the cases.  The other is where Amit
first proposed putting it, which handles some additional cases; and the
third one is where your latest patch puts it, which seems to handle all
cases.  Isn't that what Amit is saying?  If that's correct (and that's
what I want to imply with the comment changes I proposed), then we
should just accept that version of the patch.

I don't think that we care about what happens with constraint_exclusion
is on.  That's not the recommended value for that setting anyway.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Isaac Morland
Date:
Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
Next
From: Tomas Vondra
Date:
Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions