Re: Minmax indexes - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Minmax indexes
Date
Msg-id CAM-w4HOF8KNPSO7grTL=n83bRe+B+BEpZ5WbAxyP+updbdpNEA@mail.gmail.com
Whole thread Raw
In response to Re: Minmax indexes  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Thu, Jul 10, 2014 at 10:29 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
>
> What I think should happen is that if the value is changed, the index
> sholud be rebuilt right there.

I disagree. It would be a non-orthogonal interface if ALTER TABLE
sometimes causes the index to be rebuilt and sometimes just makes a
configuration change. I already see a lot of user confusion when some
ALTER TABLE commands rewrite the table and some are quick meta data
changes.

Especially in this case where the type of configuration being changed
is just an internal storage parameter and the user visible shape of
the index is unchanged it would be weird to rebuild the index.

IMHO the "right" thing to do is just to say this parameter is
read-only and have the AM throw an error when the user changes it. But
even that would require an AM callback for the AM to even know about
the change.

-- 
greg



pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Minmax indexes
Next
From: Bruce Momjian
Date:
Subject: Re: Pg_upgrade and toast tables bug discovered