Re: Why does [auto-]vacuum delay not report a wait event?

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Why does [auto-]vacuum delay not report a wait event?
Дата
Msg-id CAA4eK1JhG-VUKeYRfAeAY56qGdG6O=i9zGo=85i-63gc7Fs83w@mail.gmail.com
обсуждение исходный текст
Ответ на Why does [auto-]vacuum delay not report a wait event?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Why does [auto-]vacuum delay not report a wait event?  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
On Fri, Mar 20, 2020 at 4:15 AM Andres Freund <andres@anarazel.de> wrote:
>
> Hi,
>
> I was looking at [1], wanting to suggest a query to monitor what
> autovacuum is mostly waiting on. Partially to figure out whether it's
> mostly autovacuum cost limiting.
>
> But uh, unfortunately the vacuum delay code just sleeps without setting
> a wait event:
>
> void
> vacuum_delay_point(void)
> {
> ...
>         /* Nap if appropriate */
>         if (msec > 0)
>         {
>                 if (msec > VacuumCostDelay * 4)
>                         msec = VacuumCostDelay * 4;
>
>                 pg_usleep((long) (msec * 1000));
>
>
> Seems like it should instead use a new wait event in the PG_WAIT_TIMEOUT
> class?
>

+1.  I think it will be quite helpful.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: error context for vacuum to include block number
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Why does [auto-]vacuum delay not report a wait event?