For this specific job, I have always wanted a try_index_open() that
would attempt to open the index with a relkind check, perhaps we could
introduce one and reuse it here?

Yes, replacing index_open with try_index_open solves the problem. The
idea is similar to my initial report of "after successfully opening the heap
table in reindex_index, check again whether the index still exists”.
But it should be better to introduce try_index_open.

Attachment: v1-try_index_open.patch
Description: Binary data


Best Regards,
Fei Changhong
Alibaba Cloud Computing Ltd.

Reply via email to