Re: [HACKERS] Somebody has not thought through subscription lockingconsiderations

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [HACKERS] Somebody has not thought through subscription lockingconsiderations
Дата
Msg-id 2299a476-07ec-ac85-fd04-3ae79cb7dd94@2ndquadrant.com
обсуждение исходный текст
Список pgsql-hackers
On 3/31/17 20:25, Petr Jelinek wrote:
> On 01/04/17 01:57, Petr Jelinek wrote:
>> That being said, looking at use-cases for SetSubscriptionRelState that's
>> basically CREATE SUBSCRIPTION, ALTER SUBSCRIPTION REFRESH and tablesync
>> worker. So the DDL thing applies to first ones as well and tablesync
>> should not be running in case the record does not exist so it's fine if
>> it fails. In terms of RemoveSubscriptionRel that's only called from
>> heap_drop_with_catalog and tablesync holds relation lock so there is no
>> way heap_drop_with_catalog will happen on the same relation. This leads
>> me to thinking that RowExclusiveLock is fine for both
>> SetSubscriptionRelState and RemoveSubscriptionRel as long as we document
>> that callers should be aware that SetSubscriptionRelState has
>> concurrency issues and fail on unique index check.
>>
> 
> And a simple patch to do so. Peter do you see any problem with doing this?

committed

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



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] recent deadlock regression test failures
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] "left shift of negative value" warnings