Re: DROP USER MAPPING doesn't acquire lock on its server

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: DROP USER MAPPING doesn't acquire lock on its server
Date: 2026-12-03 03:55:23
Message-ID: CAGRkXqRLN6+GdokEuqJkw2-A5B8EriOLDjLviGe_KGgodyjHLg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-12-03 04:09:16 Standby writes pages past minRecoveryPoint after crash recovery
Previous Message Peter Smith 2026-12-03 03:52:31 Re: DOC: Minor updates for logical replication conflicts