Re: [HACKERS] Proposal: Local indexes for partitioned table
От
Alvaro Herrera
Тема
Re: [HACKERS] Proposal: Local indexes for partitioned table
Дата
Msg-id
20171215221801.omgguzuor3ez7lre@alvherre.pgsql
Ответ на
Список
Дерево обсуждения
[HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Re: Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Re: [HACKERS] Proposal: Local indexes for partitioned table Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Re: [HACKERS] Proposal: Local indexes for partitioned table Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <milyutinma@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Greg Stark <stark@mit.edu>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <milyutinma@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Simon Riggs <simon@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Jesper Pedersen <jesper.pedersen@redhat.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Simon Riggs <simon@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <milyutinma@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Robert Haas wrote:
> On Fri, Dec 15, 2017 at 4:02 PM, Alvaro Herrera wrote:
> > 3. Robert's: use CREATE INDEX ON ONLY , which creates a shell
> > index on parent only (no recursion), followed by CREATE INDEX ON
> > . DETACH is not provided. If you ATTACH an index for a
> > partition that already has one index attached, then (1) the newly
> > attached one replaces the original (i.e. effectively REPLACE) or (2)
> > you get an error and we implement a separate ALTER INDEX REPLACE
> > command. It's not clear to me how or when the shell index becomes a
> > real index.
>
> With this proposal, I think the index can be invalid initially, but
> once you've attached an index for every child partition, it becomes
> irrevocably valid. After that, the only supported operation is
> REPLACE, which preserves validity.
Sounds okay to me. (I had already deleted ALTER INDEX DETACH from my
patch earlier today.) I admit I had also deleted the ONLY clause from
CREATE INDEX, and I don't like having to put it back :-) But on the
whole, having it sounds better than the alternatives.
We have two options for marking valid:
1. after each ALTER INDEX ATTACH, verify whether the set of partitions
that contain the index is complete; if so, mark it valid, otherwise do
nothing. This sucks because we have to check that over and over for
every index that we attach
2. We invent yet another command, say
ALTER INDEX VALIDATE
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления
От: Alvaro Herrera
Дата:
От: Peter Geoghegan
Дата: