Re: REINDEX SCHEMA/DATABASE/SYSTEM weak with dropped relations - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: REINDEX SCHEMA/DATABASE/SYSTEM weak with dropped relations
Date
Msg-id 20200901013844.GA3511@paquier.xyz
Whole thread Raw
In response to Re: REINDEX SCHEMA/DATABASE/SYSTEM weak with dropped relations  (Anastasia Lubennikova <a.lubennikova@postgrespro.ru>)
Responses Re: REINDEX SCHEMA/DATABASE/SYSTEM weak with dropped relations  (Anastasia Lubennikova <a.lubennikova@postgrespro.ru>)
List pgsql-hackers
On Mon, Aug 31, 2020 at 06:10:46PM +0300, Anastasia Lubennikova wrote:
> I reviewed the patch. It does work and the code is clean and sane. It
> implements a logic that we already had in CLUSTER, so I think it was simply
> an oversight. Thank you for fixing this.

Thanks Anastasia for the review.

> I noticed that REINDEXOPT_MISSING_OK can be passed to the TOAST table
> reindex. I think it would be better to reset the flag in this
> reindex_relation() call, as we don't expect a concurrent DROP here.

Good point, and fixed by resetting the flag here if it is set.

I have added some extra comments.  There is one in
ReindexRelationConcurrently() to mention that there should be no extra
use of MISSING_OK once the list of indexes is built as session locks
are taken where needed.

Does the version attached look fine to you?  I have done one round of
indentation while on it.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Tatsuro Yamada
Date:
Subject: Re: v13: show extended stats target in \d
Next
From: Michael Paquier
Date:
Subject: Re: Manager for commit fest 2020-09