pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use condition variables to wait for checkpoints.
Date: Wed, 13 Mar 2019 22:02:43 +0000
Message-ID: <E1h4BxT-0007ae-UP@gemulon.postgresql.org> (raw)

Use condition variables to wait for checkpoints.

Previously we used a polling/sleeping loop to wait for checkpoints
to begin and end, which leads to up to a couple hundred milliseconds
of needless thumb-twiddling.  Use condition variables instead.

Author: Thomas Munro
Reviewed-by: Andres Freund
Discussion: https://postgr.es/m/CA%2BhUKGLY7sDe%2Bbg1K%3DbnEzOofGoo4bJHYh9%2BcDCXJepb6DQmLw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c6c9474aafa4de357ae424cd18b69e8bf7a4babe

Modified Files
--------------
doc/src/sgml/monitoring.sgml          | 10 +++++++++-
src/backend/postmaster/checkpointer.c | 21 +++++++++++++++++----
src/backend/postmaster/pgstat.c       |  6 ++++++
src/include/pgstat.h                  |  2 ++
4 files changed, 34 insertions(+), 5 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1h4BxT-0007ae-UP@gemulon.postgresql.org>
Permalink:  ../E1h4BxT-0007ae-UP@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1h4BxT-0007ae-UP@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Use condition variables to wait for checkpoints.
  In-Reply-To: <E1h4BxT-0007ae-UP@gemulon.postgresql.org>
  References: <E1h4BxT-0007ae-UP@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox