Hi A concurrent DROP SERVER can remove a foreign server that CREATE USER MAPPING wants to use, on master this produces an internal XX000 cache lookup error. There is a gap between get_foreign_server_oid/GetForeignServer which allows this race.
Deterministic test + actual output from today's HEAD attached. Attached fix resolves the server with get_object_address(..., AccessShareLock, ...), which protects against concurrent deletion - this is something other places in core do, for example generic Rename does it. +CC Jeff Davis because we committed number of fixes/enhancements in this area which I find related to issue [0] [0] https://www.postgresql.org/message-id/95a4a0d1f9b1a2e9d2e339b41b532131571150af.camel%40j-davis.com -- Best regards, Kirill Reshke
injection-point-test.patch
Description: Binary data
actual-output.out
Description: Binary data
fix.diff
Description: Binary data
