Re: [HACKERS] path toward faster partition pruning - Mailing list pgsql-hackers

From David Rowley
Subject Re: [HACKERS] path toward faster partition pruning
Date
Msg-id CAKJS1f-QonTyXeQE+F2WoGjaB+mmN+8-mc+ca52VK8Yzu9QA9w@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] path toward faster partition pruning  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: [HACKERS] path toward faster partition pruning  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
On 21 March 2018 at 00:07, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote:
> Attached is further revised version.

In the 0004 patch I see:

@@ -1439,6 +1441,10 @@ inheritance_planner(PlannerInfo *root)
  if (IS_DUMMY_PATH(subpath))
  continue;

+ /* Add the current parent's RT index to the partitioned rels set. */
+ partitioned_relids = bms_add_member(partitioned_relids,
+ appinfo->parent_relid);

This seems to execute regardless of if the target relation is a
partitioned table or an inheritance parent. I think there needs to be
a condition so you only do this when planning for partitioned tables.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: [HACKERS] plpgsql - additional extra checks
Next
From: Christoph Berg
Date:
Subject: Re: [HACKERS] Optional message to user when terminating/cancellingbackend