Re: [HACKERS] Proposal: Local indexes for partitioned table
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
From: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Simon Riggs <simon@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>,
Pg Hackers <pgsql-hackers@postgresql.org>, Maksim Milyutin <milyutinma@gmail.com>
Date: 2017-11-20T08:38:22Z
Lists: 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
Commits
-
Local partitioned indexes
- 8b08f7d4820f 11.0 landed
-
Fix StoreCatalogInheritance1 to use 32bit inhseqno
- 1ef61ddce908 11.0 landed
- 9a215fb4b5ec 9.3.21 landed
- 8a71ee628854 9.6.7 landed
- 61f08c016322 10.2 landed
- 1284d18b5de9 9.4.16 landed
- 0d993709a773 9.5.11 landed
-
Get rid of copy_partition_key
- 8a0596cb656e 11.0 landed
-
Simplify index_[constraint_]create API
- a61f5ab98638 11.0 landed