Re: Checkpointer sync queue fills up / loops around pg_usleep() are bad

2022-03-15 Thread Thomas Munro
On Wed, Mar 2, 2022 at 10:58 AM Andres Freund wrote: > On 2022-03-02 06:46:23 +1300, Thomas Munro wrote: > > From a9344bb2fb2a363bec4be526f87560cb212ca10b Mon Sep 17 00:00:00 2001 > > From: Thomas Munro > > Date: Mon, 28 Feb 2022 11:27:05 +1300 > > Subject: [PATCH v2 1/3] Wake up for latches in C

Re: Checkpointer sync queue fills up / loops around pg_usleep() are bad

2022-03-01 Thread Andres Freund
Hi, On 2022-03-02 06:46:23 +1300, Thomas Munro wrote: > > I do think it's worth giving that sleep a proper wait event though, even in > > the back branches. > > I'm thinking that 0002 should be back-patched all the way, but 0001 > could be limited to 14. No strong opinion on back to where to ba

Re: Checkpointer sync queue fills up / loops around pg_usleep() are bad

2022-03-01 Thread Thomas Munro
On Mon, Feb 28, 2022 at 2:36 PM Andres Freund wrote: > On February 27, 2022 4:19:21 PM PST, Thomas Munro > wrote: > >It seems a little strange to introduce a new wait event that will very > >often appear into a stable branch, but ... it is actually telling the > >truth, so there is that. > > In

Re: Checkpointer sync queue fills up / loops around pg_usleep() are bad

2022-02-27 Thread Andres Freund
Hi, On February 27, 2022 4:19:21 PM PST, Thomas Munro wrote: >With the attached, 027_stream_regress.pl drops from ~29.5s to ~19.6s >on my FreeBSD workstation! That's impressive - wouldn't have guessed it to make that much of a difference. I assume that running the tests on freebsd for an olde

Re: Checkpointer sync queue fills up / loops around pg_usleep() are bad

2022-02-27 Thread Thomas Munro
On Sun, Feb 27, 2022 at 10:29 PM Julien Rouhaud wrote: > On Sun, Feb 27, 2022 at 06:10:45PM +0900, Michael Paquier wrote: > > On Sat, Feb 26, 2022 at 01:39:42PM -0800, Andres Freund wrote: > > > I suspect the easiest is to just convert that usleep to a WaitLatch(). > > > That'd > > > require addi

Re: Checkpointer sync queue fills up / loops around pg_usleep() are bad

2022-02-27 Thread Julien Rouhaud
On Sun, Feb 27, 2022 at 06:10:45PM +0900, Michael Paquier wrote: > On Sat, Feb 26, 2022 at 01:39:42PM -0800, Andres Freund wrote: > > I suspect the easiest is to just convert that usleep to a WaitLatch(). > > That'd > > require adding a new enum value to WaitEventTimeout in 14. Which probably is >

Re: Checkpointer sync queue fills up / loops around pg_usleep() are bad

2022-02-27 Thread Michael Paquier
On Sat, Feb 26, 2022 at 01:39:42PM -0800, Andres Freund wrote: > I suspect the easiest is to just convert that usleep to a WaitLatch(). That'd > require adding a new enum value to WaitEventTimeout in 14. Which probably is > fine? We've added wait events in back-branches in the past, so this does n

Checkpointer sync queue fills up / loops around pg_usleep() are bad

2022-02-26 Thread Andres Freund
Hi, In two recent investigations in occasional test failures (019_replslot_limit.pl failures, AIO rebase) the problems are somehow tied to checkpointer. I don't yet know if actually causally related to precisely those failures, but when running e.g. 027_stream_regress.pl, I see phases in which ma