You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make pg_replication_origen_drop safe against concurrent drops.
Currently, we get the origen id from the name and then drop the origen by
taking ExclusiveLock on ReplicationOriginRelationId. So, two concurrent
sessions can get the id from the name at the same time and then when they
try to drop the origen, one of the sessions will get the either
"tuple concurrently deleted" or "cache lookup failed for replication
origen ..".
To prevent this race condition we do the entire operation under lock. This
obviates the need for replorigen_drop() API and we have removed it so if
any extension authors are using it they need to instead use
replorigen_drop_by_name. See it's usage in pg_replication_origen_drop().
Author: Peter Smith
Reviewed-by: Amit Kapila, Euler Taveira, Petr Jelinek, and Alvaro
Herrera
Discussion: https://www.postgresql.org/message-id/CAHut%2BPuW8DWV5fskkMWWMqzt-x7RPcNQOtJQBp6SdwyRghCk7A%40mail.gmail.com
0 commit comments