Re: [HACKERS] Proposal: Local indexes for partitioned table - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: [HACKERS] Proposal: Local indexes for partitioned table
Date
Msg-id CAFjFpRfp_MLi6O5a1GkW7ugz0YbhkyO18Ck0S0ok1JHECpBB0Q@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Proposal: Local indexes for partitioned table  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
On Fri, Nov 17, 2017 at 6:24 PM, David Rowley
<david.rowley@2ndquadrant.com> wrote:
>
> I'm kind of thinking this patch should change that, even if the patch is not
> making use of the indexes, you could argue that something using
> set_rel_pathlist_hook might want to do something there, although, there's
> likely a bunch of counter arguments too.
>

How do you think optimizer would use this information? A partitioned
table which doesn't have data doesn't need that information.

Partitioned table's behaviour here is similar to that of the
inheritance parent. Even though an inheritance parent may have indexes
on it, that information is not read and stored by optimizer for that
table in its role as an inheritance parent. It stores and uses that
information for that table in its role as the child, which gets
scanned.

May be in future, we will try to create common index paths for all
children for the indexes which are inherited from the parent. Then we
might want to load the index information for partitioned table as
well, but I don't think we are any close to do that.

-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company


pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: [HACKERS] Proposal: generic WAL compression
Next
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] pgbench regression test failure