Re: Wait events for delayed checkpoints

Поиск
Список
Период
Сортировка
Искать
От
Michael Paquier
Тема
Re: Wait events for delayed checkpoints
Дата
Msg-id
ZSh8oYlewbeHhmeH@paquier.xyz
Ответ на
Список
Дерево обсуждения
Wait events for delayed checkpoints Thomas Munro <thomas.munro@gmail.com>
Re: Wait events for delayed checkpoints Robert Haas <robertmhaas@gmail.com>
Re: Wait events for delayed checkpoints Michael Paquier <michael@paquier.xyz>
Re: Wait events for delayed checkpoints Robert Haas <robertmhaas@gmail.com>
Re: Wait events for delayed checkpoints Thomas Munro <thomas.munro@gmail.com>
On Thu, Oct 12, 2023 at 01:32:29PM -0400, Robert Haas wrote:
> IPC seems right to me. Yeah, a timeout is being used, but as you say,
> that's an implementation detail.
> 
> +1 for the idea, too.

Agreed that timeout makes little sense in this context, and IPC looks
correct.

+        pgstat_report_wait_start(WAIT_EVENT_CHECKPOINT_DELAY_START);
         do
         {
             pg_usleep(10000L);    /* wait for 10 msec */
         } while (HaveVirtualXIDsDelayingChkpt(vxids, nvxids,
                                               DELAY_CHKPT_START));
+        pgstat_report_wait_end();

HaveVirtualXIDsDelayingChkpt() does immediately a LWLockAcquire()
which would itself report a wait event for ProcArrayLock, overwriting
this new one, no?
--
Michael
В списке pgsql-hackers по дате отправления
От: Alexander Korotkov
Дата:
От: Noah Misch
Дата:
FAQ