pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Chris Wilson <chris+google@qwirx.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Pg Docs <pgsql-docs@lists.postgresql.org>
Subject: Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?
Date: Wed, 11 Nov 2020 18:24:17 -0500
Message-ID: <20201111232417.GH25840@momjian.us> (raw)
In-Reply-To: <CAOg7f80w3u2U8Jqrh=CbAYB4V07x=X88zrbPVuCCgFqcj88mJw@mail.gmail.com>
References: <160399562040.7809.7335281028960123489@wrigleys.postgresql.org>
	<CA+hUKGJG-4huRapjPL7kBXAd+iBW5i09WKgWOFF6E31z_aHkmQ@mail.gmail.com>
	<CAOg7f8272Om2sEM8H0u8u9weVX6NTJNrZqv_FqaRBXmBEQY9aQ@mail.gmail.com>
	<CAOg7f80WL7cR1TgXXCzzXYcNtfjgAkkc+zXr9T9tshy8jBSZLw@mail.gmail.com>
	<20201110013632.GA8789@momjian.us>
	<20201110160801.GA25651@momjian.us>
	<CAOg7f80w3u2U8Jqrh=CbAYB4V07x=X88zrbPVuCCgFqcj88mJw@mail.gmail.com>

On Wed, Nov 11, 2020 at 11:29:09AM +0000, Chris Wilson wrote:
> I still believe that my original proposed change, to "This reduces the chances
> that a backend needing an empty buffer must [itself] write a dirty one back to
> disk before evicting it" (with one extra word added), resolves the ambiguity
> and also more clearly and directly focuses it on what the bgwriter does and
> why, making it better documentation. It might be incorrect if my understanding
> is incorrect - is it?

You make some very good points.  Here is an updated patch.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee

Attachments:

bgwriter.diff (text/x-diff, 1.2K) download diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index f043433e31..294017c86e 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -2146,9 +2146,12 @@ include_dir 'conf.d' There is a separate server process called the <firstterm>background writer</firstterm>, whose function is to issue writes of <quote>dirty</quote> (new or modified) shared - buffers. It writes shared buffers so server processes handling - user queries seldom or never need to wait for a write to occur. - However, the background writer does cause a net overall + buffers. When the percentage of dirty shared buffers is high, the + background writer writes some of them to the file system and marks + them as clean. This reduces the likelihood that server processes + handling user queries will be unable to find clean buffers and have + to write dirty buffers to the file system themselves. However, + the background writer does cause a net overall increase in I/O load, because while a repeatedly-dirtied page might otherwise be written only once per checkpoint interval, the background writer might write it several times as it is dirtied

view thread (14+ messages)  latest in thread

Message-ID: <20201111232417.GH25840@momjian.us>
Permalink:  ../20201111232417.GH25840@momjian.us/
Also on:    postgresql.org/message-id/20201111232417.GH25840@momjian.us

 ·  · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: bruce@momjian.us, chris+google@qwirx.com, thomas.munro@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?
  In-Reply-To: <20201111232417.GH25840@momjian.us>

* 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