Since we are already opening the relation with rel = relation_open(relOid, AccessShareLock);,
if relOid does not exist, it will throw an error. If it does exist, we acquire an AccessShareLock,
preventing it from being dropped.
By the time we reach IndexGetRelation(), we can be confident that relOid exists and is
protected by the lock. Given this, it makes sense to keep missing_ok = false here.
Let me know if you agree or if you see any scenario where missing_ok = true would be preferable—I can update the condition accordingly.
Thanks!
Ayush Vatsa
SDE AWS