Re: REINDEX backend filtering

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Darafei "Komяpa" Praliaskouski <me(at)komzpa(dot)net>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: REINDEX backend filtering
Date: 2021-02-26 07:45:31
Message-ID: 20210226074531.dhkfneao2czzqk6n@nol
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On Wed, Feb 24, 2021 at 09:34:59PM +0300, Darafei "Komяpa" Praliaskouski wrote:
> Hello,
> The PostGIS project needed this from time to time. Would be great if
> reindex by opclass can be made possible.
> We changed the semantics of btree at least twice (in 2.4 and 3.0), fixed
> some ND mixed-dimension indexes semantics in 3.0, fixed hash index on 32
> bit arch in 3.0.

Oh, I wasn't aware of that. Thanks for bringing this up!

Looking at the last occurence (c00f9525a3c6c) I see that the NEWS item does
mention the need to do a REINDEX. As far as I understand there wouldn't be any
hard error if one doesn't do to a REINDEX, and you'd end up with some kind
of "logical" corruption as the new lib version won't have the same semantics
depending on the number of dimensions, so more or less the same kind of
problems that would happen in case of breaking update of a collation library.

It seems to me that it's a legitimate use case, especially since GiST doesn't
have a metapage to store an index version. But I'm wondering if the right
answer is to allow REINDEX / reindexdb to look for specific opclass or to add
an API to let third party code register a custom dependency. In this case
it would be some kind of gist ABI versioning. We could then have a single
REINDEX option, like REINDEX (OUTDATED) as Thomas suggested in
for both cases.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2021-02-26 07:52:32 Re: REINDEX backend filtering
Previous Message Amit Langote 2021-02-26 07:29:49 Re: a misbehavior of partition row movement (?)