From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Wait events for delayed checkpoints |
Date: | 2023-10-13 01:19:29 |
Message-ID: | CA+Tgmoa2qFvo9b73Z0rkdftdfMbTS+X1OCTLw0X6J7y1HEZQBA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Oct 12, 2023 at 7:09 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> 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?
Ah, right: the wait event should be set and cleared around pg_usleep,
not the whole loop.
--
Robert Haas
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Vik Fearing | 2023-10-13 01:25:40 | Re: PostgreSQL domains and NOT NULL constraint |
Previous Message | Robert Haas | 2023-10-13 01:18:23 | Re: On login trigger: take three |