Re: Possible race in UnlockBuffers() and UnpinBuffer()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Possible race in UnlockBuffers() and UnpinBuffer()
Дата
Msg-id 12922.1145074915@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Possible race in UnlockBuffers() and UnpinBuffer()  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
Список pgsql-hackers
"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> "Tom Lane" <tgl@sss.pgh.pa.us> wrote
>> "Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
>>> After this, the proc->sem will be bumped to 1 unexpectedly ... Since
>>> this problem is rare, a possible fix is to put a critical section
>>> around line 1 to 7 and remove UnlockBuffers() accordingly.
>> 
>> No, that would make any attempt to control-C a VACUUM have a significant
>> probability for panicking the whole database.

> Why panicking by control-C?

Because the entire point of a critical section is that any error (eg
"Query cancelled") is turned into a panic.  So a query-cancel attempt
while a vacuum is blocked here would either do nothing (bad) or panic
the database (worse).
        regards, tom lane


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

Предыдущее
От: "Qingqing Zhou"
Дата:
Сообщение: Re: Possible race in UnlockBuffers() and UnpinBuffer()
Следующее
От: Tom Lane
Дата:
Сообщение: Re: two-argument aggregates and SQL 2003