Re: CHECK_FOR_INTERRUPTS in spgdoinsert() isn't helpful

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CHECK_FOR_INTERRUPTS in spgdoinsert() isn't helpful
Дата
Msg-id 16812.1401396097@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CHECK_FOR_INTERRUPTS in spgdoinsert() isn't helpful  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> On 05/29/2014 11:25 PM, Tom Lane wrote:
>> In point of fact, we'd be happy to give up the locks and then throw
>> the error.  So I was thinking about inventing some macro or out-of-line
>> function that went about like this:
>> 
>> if (InterruptPending && (QueryCancelPending || ProcDiePending))
>> {
>>    LWLockReleaseAll();
>>     ProcessInterrupts();
>>     elog(ERROR, "ProcessInterrupts failed to throw an error");
>> }

> Also checking that CritSectionCount == 0 seems like a good idea...

Yeah, and there may be a couple other details like that.  Right now
I'm just thinking about not allowing LWLocks to block the cancel.
I guess something else to consider is whether InterruptHoldoffCount
could be larger than the number of held LWLocks; if so, that would
prevent this from working as desired.
        regards, tom lane



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Extended Prefetching using Asynchronous IO - proposal and patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CHECK_FOR_INTERRUPTS in spgdoinsert() isn't helpful