Re: [HACKERS] Proposal: Local indexes for partitioned table
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Simon Riggs <simon@2ndquadrant.com>, Pg Hackers <pgsql-hackers@postgresql.org>,
Maksim Milyutin <milyutinma@gmail.com>
Date: 2017-12-07T23:06:43Z
Lists: pgsql-hackers
On 8 December 2017 at 11:23, Robert Haas <robertmhaas@gmail.com> wrote: > On Thu, Dec 7, 2017 at 4:57 PM, David Rowley > <david.rowley@2ndquadrant.com> wrote: >> That's true, but is it worth inventing/maintaining an ATTACH syntax >> for that? It's not a very common case that multiple matching indexes >> existing. If it is worth it, do we need DETACH at all? > > I think it is totally worth it. A little piece of extra DDL syntax > isn't that really costing us anything. Your proposed approach > probably still has obscure failure cases - e.g. I bet the > deadlock-avoidance logic in parallel restore won't know about the > dependency on a seemingly-unrelated object. Also, the use of a > seemingly-useless REPLACE syntax in every dump file will probably > confuse at least a few users, and maybe a few developers, too. I > think there is considerable value, both for the system and for the > humans who use it, in having something that has *exactly* the > semantics we want rather than *almost* the semantics we want. > > I suppose if we want to get cute, we could have ONLY the ATTACH > syntax; if you attach an index for a partition that already has an > index attached, that could mean attach to the new one instead of the > old one (i.e. replace). But I would just add support for both ATTACH > and REPLACE and call it good. ATTACH/REPLACE sounds fine. My objection was more about the DETACH/ATTACH method to replace an index. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
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