Re: checkpoint_flush_after documentation inconsistency

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: checkpoint_flush_after documentation inconsistency
Date: 2016-04-18 05:33:28
Message-ID: CAHGQGwETyTG5VYQQ5C_srwxWX7RXvFcD3dKROhvAWWhoSBdmZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 15, 2016 at 6:56 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> The documentation says that the default value is 128Kb on Linux, but the
> code says it's 256Kb.
>
> Not sure which one is correct, but the other one should be updated :) I'm
> guessing it's a copy/paste mistake in the docs, but since I'm not sure I'm
> not just pushing a fix.

I think you're right.

I also found another several small problems regarding XXX_flush_after
parameters.

(1)
checkpoint_flush_after, backend_flush_after and bgwriter_flush_after
don't exist in postgresql.conf.sample. If there is no special reason for
that, it's better to add them to postgresql.conf.sample.

(2)
> /* see bufmgr.h: 16 on Linux, 0 otherwise */

The source code comment says that the default value of bgwriter_flush_after
is 16 on Linux, but it's actually 64. The parameter which its default is 16 is
backend_flush_after. This souce comment needs to be updated.

(3)
The config groups assigned to them look strange.

The group of checkpoint_flush_after is RESOURCES_ASYNCHRONOUS,
but it's documented under the section "Checkpoints". IMO, it's better
to change the group to WAL_CHECKPOINTS.

The group of bgwriter_flush_after is WAL_CHECKPOINTS,
but it's documented under the section Background Writer. IMO,
it's better to change the group to RESOURCES_BGWRITER.

(4)
> This parameter can only be set in the postgresql.conf file or on
> the server command line.

The above description should be used for a PGC_SIGHUP parameter.
But it's used for backend_flush_after which is PGC_USERSET parameter.

(5)
<term><varname>bgwriter_flush_after</varname> (<type>int</type>)
<term><varname>backend_flush_after</varname> (<type>int</type>)
<term><varname>checkpoint_flush_after</varname> (<type>int</type>)

In the doc, "int" should be "integer" for the sake of consistency.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2016-04-18 06:19:18 Re: Declarative partitioning
Previous Message Michael Paquier 2016-04-18 05:27:22 Re: Default Roles