Re: Proposal: Local indexes for partitioned table
Maksim Milyutin <m.milyutin@postgrespro.ru>
From: Maksim Milyutin <m.milyutin@postgrespro.ru>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-04-17T14:00:32Z
Lists: pgsql-hackers
Attachments
- local_index_without_new_relkind.patch (text/x-patch) patch
On 10.04.2017 14:20, Robert Haas wrote: > On Tue, Apr 4, 2017 at 12:10 PM, Maksim Milyutin > <m.milyutin@postgrespro.ru> wrote: >> 1. I have added a new relkind for local indexes named RELKIND_LOCAL_INDEX >> (literal 'l'). > > Seems like it should maybe be RELKIND_PARTITIONED_INDEX. There's > nothing particularly "local" about it. I suppose what you're going > for is that it's not global, but in a way it *is* global to the > partitioning hierarchy. That's the point. It's just that it's > partitioned. > Ok, thanks for the note. But I want to discuss the relevancy of introduction of a new relkind for partitioned index. I could to change the control flow in partitioned index creation (specify conditional statement in the 'index_create' routine in attached patch) and not enter to the 'heap_create' routine. This case releases us from integrating new relkind into different places of Postgres code. But we have to copy-paste some specific code from 'heap_create' function, e.g., definition of relfilenode and tablespaceid for the new index and perhaps something more when 'heap_create' routine will be extended. What do you think about this way? -- Maksim Milyutin Postgres Professional: http://www.postgrespro.com Russian Postgres 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