Hi Kirill,
Thanks for the report. The same race hits every command that looks up a
server by name. With your fix I still get "cache lookup failed" from
ALTER USER MAPPING and DROP USER MAPPING. CREATE FOREIGN TABLE and
IMPORT FOREIGN SCHEMA fail the same way. Maybe one shared helper that
takes the lock could fix them all?
Also, with the fix your test no longer reaches the injection point, I think
this is just for
reproduce, not for submit?
Thanks,
Shihao