Re: Support for REINDEX CONCURRENTLY - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Support for REINDEX CONCURRENTLY
Date
Msg-id 13414.1354979657@sss.pgh.pa.us
Whole thread Raw
In response to Re: Support for REINDEX CONCURRENTLY  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Support for REINDEX CONCURRENTLY  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> The issue I raised above is just about keeping the pg_depend entries
> pointing to something valid... And not changing the indexes pg_class.oid
> seems to be the easiest solution for that.

Yeah, we would have to update pg_depend, pg_constraint, maybe some other
places if we go with that.  I think that would be safe because we'd be
holding ShareRowExclusive lock on the parent table throughout, so nobody
else should be doing anything that's critically dependent on seeing such
rows.  But it'd be a lot of ugly code, for sure.

Maybe the best way is to admit that we need a short-term exclusive lock
for the swapping step.  Or we could wait for MVCC catalog access ...
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: SP-GiST for ranges based on 2d-mapping and quad-tree
Next
From: Tom Lane
Date:
Subject: Re: Proof of concept: auto updatable views [Review of Patch]