pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: confusing checkpoint_flush_after / bgwriter_flush_after
Date: Fri, 25 Nov 2016 08:40:07 +0100
Message-ID: <30ebc6e3-8358-09cf-44a8-578252938424@2ndquadrant.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Hi,

while doing some benchmarking, I've once again got confused by the 
default settings for checkpoint_flush_after and bgwriter_flush_after. 
The sample config says this:

#checkpoint_flush_after = 0   # 0 disables,
                               # default is 256kB on linux, 0 otherwise

#bgwriter_flush_after = 0     # 0 disables,
                               # default is 512kB on linux, 0 otherwise

I find this pretty confusing, because for all other GUCs in the file, 
the commented-out value is the default one. In this case that would mean 
"0", disabling the flushing.

But in practice we use platform-dependent defaults - 256/512K on Linux, 
0 otherwise. There are other GUCs where the default is 
platform-specific, but none of them suggests "disabled" is the default 
state.

While the 9.6 cat is out of the bag, I think we can fix this quite 
easily - use "-1" to specify the default value should be used, and use 
that in the sample file. This won't break any user configuration.

If that's considered not acceptable, perhaps we should at least improve 
the comments, so make this clearer.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (10+ messages)  latest in thread

Message-ID: <30ebc6e3-8358-09cf-44a8-578252938424@2ndquadrant.com>
Permalink:  ../30ebc6e3-8358-09cf-44a8-578252938424@2ndquadrant.com/
Also on:    postgresql.org/message-id/30ebc6e3-8358-09cf-44a8-578252938424@2ndquadrant.com

 · 

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-hackers@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com
  Subject: Re: confusing checkpoint_flush_after / bgwriter_flush_after
  In-Reply-To: <30ebc6e3-8358-09cf-44a8-578252938424@2ndquadrant.com>
  References: <30ebc6e3-8358-09cf-44a8-578252938424@2ndquadrant.com>

* 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