Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the sametransaction

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the sametransaction
Дата
Msg-id 014d09d5-834f-3c43-a82a-f5e2b863920c@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 9/12/17 15:51, Tom Lane wrote:
> ISTM the second of those (refuse to drop an in-use subscription) is
> by far the least surprising behavior.  However, I wonder if there aren't
> race conditions involved here.  What if we haven't yet committed a
> DROP SUBSCRIPTION, and some new worker starts up after we look for
> workers?

DROP SUBSCRIPTION takes an AccessExclusiveLock on pg_subscription to
prevent that.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the sametransaction
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: [HACKERS] Pluggable storage