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

From Robert Haas
Subject Re: [HACKERS] Proposal: Local indexes for partitioned table
Date
Msg-id CA+TgmoZCgu0ZcZbS=V+fHwYw+n_q4fRGnkOumJq88ne4vJnEyA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Proposal: Local indexes for partitioned table  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: [HACKERS] Proposal: Local indexes for partitioned table  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On Mon, Dec 11, 2017 at 10:04 PM, Alvaro Herrera
<alvherre@alvh.no-ip.org> wrote:
> David Rowley wrote:
>
>> ATTACH/REPLACE sounds fine. My objection was more about the
>> DETACH/ATTACH method to replace an index.
>
> So what happens if you do ALTER INDEX .. ATTACH and you already have
> another index in that partition that is attached to the same parent in
> the index?

I think that should be an ERROR.  You can use REPLACE if you want to
switch which index is attached, but you shouldn't be able to attach
two indexes from the same partition at the same time.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: ML-based indexing ("The Case for Learned Index Structures", apaper from Google)
Next
From: Robert Haas
Date:
Subject: Re: Inconsistency in plpgsql's error context reports