REINDEX checking of index constraints - Mailing list pgsql-hackers

From Noah Misch
Subject REINDEX checking of index constraints
Date
Msg-id 20130721172814.GC126816@tornado.leadboat.com
Whole thread Raw
List pgsql-hackers
Historically, REINDEX would always revalidate any uniqueness enforced by the
index.  An EDB customer reported that this is not happening, and indeed I
broke it way back in commit 8ceb24568054232696dddc1166a8563bc78c900a.
Specifically, REINDEX TABLE and REINDEX DATABASE no longer revalidate
constraints, but REINDEX INDEX still does so.  As a consequence, REINDEX INDEX
is the only form of REINDEX that fixes a failed CREATE INDEX CONCURRENTLY.

Attached patch just restores the old behavior.  Would it be worth preserving
the ability to fix an index consistency problem with a REINDEX independent
from related heap consistency problems such as duplicate keys?

Thanks,
nm

--
Noah Misch
EnterpriseDB                                 http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Preventing tuple-table leakage in plpgsql
Next
From: Josh Berkus
Date:
Subject: Re: REINDEX checking of index constraints