Re: pgsql: Move btbulkdelete's vacuum_delay_point()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Move btbulkdelete's vacuum_delay_point()
Дата
Msg-id 1420.1140019727@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Move btbulkdelete's vacuum_delay_point()  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-committers
Simon Riggs <simon@2ndquadrant.com> writes:
>    if (LWLockNumHeldByMe() == 0)
>        pg_usleep(msec * 1000L);
>    else
>         elog(WARNING, "losing sleep because internal locks are held");

I did some testing yesterday with an Assert added to vacuum_delay_point:
    Assert(InterruptHoldoffCount == 0 && CritSectionCount == 0);
which is basically asserting that ProcessInterrupts is allowed to
execute an interrupt.  I desisted from committing this test, though,
because it's not clear that callers should not be allowed to call
vacuum_delay_point in such cases --- for the current callers it proved
fairly easy to locate the calls at places where this is certain to be OK,
but I don't want to wire in a requirement of it.

In any case, such tests don't help for the question of whether we've
missed any major loops that ought to contain vacuum_delay_point calls.
(If we were to add a worst-case-interval measurement, it might be
reasonable to not count calls that don't meet the ProcessInterrupts
condition.)

            regards, tom lane

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: pgsql: Move btbulkdelete's vacuum_delay_point()
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Since we only use libld on AIX, don't include it in LIBS on any