Re: pgbench vs. wait events - Mailing list pgsql-hackers

From Andres Freund
Subject Re: pgbench vs. wait events
Date
Msg-id 20161007174202.pfjp4wy7hlhfpgmn@alap3.anarazel.de
Whole thread Raw
In response to Re: pgbench vs. wait events  (Alfred Perlstein <bright@mu.org>)
Responses Re: pgbench vs. wait events  (Alfred Perlstein <alfred@freebsd.org>)
List pgsql-hackers
Hi,

On 2016-10-06 20:52:22 -0700, Alfred Perlstein wrote:
> This contention on WAL reminds me of another scenario I've heard about that
> was similar.
> 
> To fix things what happened was that anyone that the first person to block
> would be responsible for writing out all buffers for anyone blocked behind
> "him".

We pretty much do that already. But while that's happening, the other
would-be-writers show up as blocking on the lock.  We don't use kind of
an odd locking model for the waiters (LWLockAcquireOrWait()), which
waits for the lock to be released, but doesn't try to acquire it
afterwards. Instead the wal position is rechecked, and in many cases
we'll be done afterwards, because enough has been written out.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgbench vs. wait events
Next
From: Tom Lane
Date:
Subject: Re: pg_dump getBlobs query broken for 7.3 servers