From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: yuzuko <yuzukohosoya@gmail.com>
Cc: shawn wang <shawn.wang.pg@gmail.com>
Cc: Shawn Wang <shawn.wang@highgo.ca>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Problem with default partition pruning
Date: Mon, 5 Aug 2019 10:39:20 -0400
Message-ID: <20190805143920.GA6232@alvherre.pgsql> (raw)
In-Reply-To: <CAKkQ509Y9FyOErKaL=isM_yEyJQwabRn4CWL4yp8CHgBEU8ZpA@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, yuzukohosoya@gmail.com, shawn.wang.pg@gmail.com, shawn.wang@highgo.ca, pgsql-hackers@lists.postgresql.org
Subject: Re: Problem with default partition pruning
In-Reply-To: <20190805143920.GA6232@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox