Hi Kirill,
Thanks for v2, it fixes all the server lookups for me. CREATE SERVER
racing with DROP FOREIGN DATA WRAPPER still fails, so maybe lock the
FDW lookup too and add a test.
> Why do we have to lock for that? I
Zsolt, I tried a single syscache lookup and CREATE FOREIGN TABLE and
CREATE SUBSCRIPTION still fail at the next lookup by OID. So I think
the lock is needed, as the comment above dependencyLockAndCheckObject()
also says. That check is already back-patched and stops orphaned rows,
so maybe this can be master only.
Regards,
Shihao