pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
wal_init_zero and wal_recycle
6+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2020-06-03 43e592c706 53f32ea4d3  doc: Move wal_init_zero and wal_recycle descriptions to proper section.
* wal_init_zero and wal_recycle
@ 2020-05-27 03:27 Fujii Masao <masao.fujii@oss.nttdata.com>
  2020-05-27 07:08 ` Re: wal_init_zero and wal_recycle Simon Riggs <simon@2ndquadrant.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Fujii Masao @ 2020-05-27 03:27 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org

Hi,

The group of wal_init_zero and wal_recycle is WAL_SETTINGS in guc.c,
but their descriptions are located in "19.6. Replication"/"19.6.1. Sending
Servers" section. This seems a documentation bug. They should be located
in "19.5. Write Ahead Log"/"19.5.1. Settings". Thought?

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: wal_init_zero and wal_recycle
  2020-05-27 03:27 wal_init_zero and wal_recycle Fujii Masao <masao.fujii@oss.nttdata.com>
@ 2020-05-27 07:08 ` Simon Riggs <simon@2ndquadrant.com>
  2020-05-27 23:43   ` Re: wal_init_zero and wal_recycle Thomas Munro <thomas.munro@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Simon Riggs @ 2020-05-27 07:08 UTC (permalink / raw)
  To: Fujii Masao <masao.fujii@oss.nttdata.com>; +Cc: pgsql-docs@lists.postgresql.org

On Wed, 27 May 2020 at 04:27, Fujii Masao <masao.fujii@oss.nttdata.com>
wrote:

> Hi,
>
> The group of wal_init_zero and wal_recycle is WAL_SETTINGS in guc.c,
> but their descriptions are located in "19.6. Replication"/"19.6.1. Sending
> Servers" section. This seems a documentation bug. They should be located
> in "19.5. Write Ahead Log"/"19.5.1. Settings". Thought?
>

+1

Why are there two settings for the same thing (COW support)?
Would we really want to allow setting one but not the other?

-- 
Simon Riggs                http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/;
Mission Critical Databases

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: wal_init_zero and wal_recycle
  2020-05-27 03:27 wal_init_zero and wal_recycle Fujii Masao <masao.fujii@oss.nttdata.com>
  2020-05-27 07:08 ` Re: wal_init_zero and wal_recycle Simon Riggs <simon@2ndquadrant.com>
@ 2020-05-27 23:43   ` Thomas Munro <thomas.munro@gmail.com>
  2020-05-29 04:13     ` Re: wal_init_zero and wal_recycle Fujii Masao <masao.fujii@oss.nttdata.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Thomas Munro @ 2020-05-27 23:43 UTC (permalink / raw)
  To: Simon Riggs <simon@2ndquadrant.com>; +Cc: Fujii Masao <masao.fujii@oss.nttdata.com>; pgsql-docs@lists.postgresql.org

On Wed, May 27, 2020 at 7:09 PM Simon Riggs <simon@2ndquadrant.com> wrote:
> On Wed, 27 May 2020 at 04:27, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>>
>> Hi,
>>
>> The group of wal_init_zero and wal_recycle is WAL_SETTINGS in guc.c,
>> but their descriptions are located in "19.6. Replication"/"19.6.1. Sending
>> Servers" section. This seems a documentation bug. They should be located
>> in "19.5. Write Ahead Log"/"19.5.1. Settings". Thought?
>
>
> +1
>
> Why are there two settings for the same thing (COW support)?
> Would we really want to allow setting one but not the other?

In the long discussion[1] we decided to invent GUCs that tell you
precisely what they do, rather than trying to have a mysterious "COW
filesystem mode", given the apparent lack of COW filesystem expertise
in the thread (for example: claims, theories and data about ZFS were
presented, but do they also apply to BTRFS, APFS, ReFS, ...?  I dunno,
and no one showed up with more information on that.)

[1] https://www.postgresql.org/message-id/flat/CACPQ5Fo00QR7LNAcd1ZjgoBi4y97%2BK760YABs0vQHH5dLdkkMA%40m...





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: wal_init_zero and wal_recycle
  2020-05-27 03:27 wal_init_zero and wal_recycle Fujii Masao <masao.fujii@oss.nttdata.com>
  2020-05-27 07:08 ` Re: wal_init_zero and wal_recycle Simon Riggs <simon@2ndquadrant.com>
  2020-05-27 23:43   ` Re: wal_init_zero and wal_recycle Thomas Munro <thomas.munro@gmail.com>
@ 2020-05-29 04:13     ` Fujii Masao <masao.fujii@oss.nttdata.com>
  2020-06-02 05:25       ` Re: wal_init_zero and wal_recycle Fujii Masao <masao.fujii@oss.nttdata.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Fujii Masao @ 2020-05-29 04:13 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@gmail.com>; Simon Riggs <simon@2ndquadrant.com>; +Cc: pgsql-docs@lists.postgresql.org



On 2020/05/28 8:43, Thomas Munro wrote:
> On Wed, May 27, 2020 at 7:09 PM Simon Riggs <simon@2ndquadrant.com> wrote:
>> On Wed, 27 May 2020 at 04:27, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>>>
>>> Hi,
>>>
>>> The group of wal_init_zero and wal_recycle is WAL_SETTINGS in guc.c,
>>> but their descriptions are located in "19.6. Replication"/"19.6.1. Sending
>>> Servers" section. This seems a documentation bug. They should be located
>>> in "19.5. Write Ahead Log"/"19.5.1. Settings". Thought?
>>
>>
>> +1

Thanks! Patch attached.
Since they are located just before wal_buffers in postgresql.conf.sample,
I moved the descriptions of them also just before that of wal_buffers
in "Write Ahead Log"/"Settings" section.

BTW, while reading guc.c, I found the GUC context of wal_recycle is
PGC_SUSET. But isn't it better to set it to PGC_SIGHUP because wal_recycle
doesn't affect any backends? Basically checkpointer and startup process
use wal_recycle.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachments:

wal_guc_docs.patch (text/plain, 3.8K) download diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index a2694e548a..862baae0c8 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -2820,6 +2820,41 @@ include_dir 'conf.d' </listitem> </varlistentry> + <varlistentry id="guc-wal-init-zero" xreflabel="wal_init_zero"> + <term><varname>wal_init_zero</varname> (<type>boolean</type>) + <indexterm> + <primary><varname>wal_init_zero</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + If set to <literal>on</literal> (the default), this option causes new + WAL files to be filled with zeroes. On some file systems, this ensures + that space is allocated before we need to write WAL records. However, + <firstterm>Copy-On-Write</firstterm> (COW) file systems may not benefit + from this technique, so the option is given to skip the unnecessary + work. If set to <literal>off</literal>, only the final byte is written + when the file is created so that it has the expected size. + </para> + </listitem> + </varlistentry> + + <varlistentry id="guc-wal-recycle" xreflabel="wal_recycle"> + <term><varname>wal_recycle</varname> (<type>boolean</type>) + <indexterm> + <primary><varname>wal_recycle</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + If set to <literal>on</literal> (the default), this option causes WAL + files to be recycled by renaming them, avoiding the need to create new + ones. On COW file systems, it may be faster to create new ones, so the + option is given to disable this behavior. + </para> + </listitem> + </varlistentry> + <varlistentry id="guc-wal-buffers" xreflabel="wal_buffers"> <term><varname>wal_buffers</varname> (<type>integer</type>) <indexterm> @@ -3752,41 +3787,6 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows </listitem> </varlistentry> - <varlistentry id="guc-wal-init-zero" xreflabel="wal_init_zero"> - <term><varname>wal_init_zero</varname> (<type>boolean</type>) - <indexterm> - <primary><varname>wal_init_zero</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - If set to <literal>on</literal> (the default), this option causes new - WAL files to be filled with zeroes. On some file systems, this ensures - that space is allocated before we need to write WAL records. However, - <firstterm>Copy-On-Write</firstterm> (COW) file systems may not benefit - from this technique, so the option is given to skip the unnecessary - work. If set to <literal>off</literal>, only the final byte is written - when the file is created so that it has the expected size. - </para> - </listitem> - </varlistentry> - - <varlistentry id="guc-wal-recycle" xreflabel="wal_recycle"> - <term><varname>wal_recycle</varname> (<type>boolean</type>) - <indexterm> - <primary><varname>wal_recycle</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - If set to <literal>on</literal> (the default), this option causes WAL - files to be recycled by renaming them, avoiding the need to create new - ones. On COW file systems, it may be faster to create new ones, so the - option is given to disable this behavior. - </para> - </listitem> - </varlistentry> - <varlistentry id="guc-max-slot-wal-keep-size" xreflabel="max_slot_wal_keep_size"> <term><varname>max_slot_wal_keep_size</varname> (<type>integer</type>) <indexterm>
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: wal_init_zero and wal_recycle
  2020-05-27 03:27 wal_init_zero and wal_recycle Fujii Masao <masao.fujii@oss.nttdata.com>
  2020-05-27 07:08 ` Re: wal_init_zero and wal_recycle Simon Riggs <simon@2ndquadrant.com>
  2020-05-27 23:43   ` Re: wal_init_zero and wal_recycle Thomas Munro <thomas.munro@gmail.com>
  2020-05-29 04:13     ` Re: wal_init_zero and wal_recycle Fujii Masao <masao.fujii@oss.nttdata.com>
@ 2020-06-02 05:25       ` Fujii Masao <masao.fujii@oss.nttdata.com>
  2020-06-03 01:16         ` Re: wal_init_zero and wal_recycle Fujii Masao <masao.fujii@oss.nttdata.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Fujii Masao @ 2020-06-02 05:25 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@gmail.com>; Simon Riggs <simon@2ndquadrant.com>; +Cc: pgsql-docs@lists.postgresql.org



On 2020/05/29 13:13, Fujii Masao wrote:
> 
> 
> On 2020/05/28 8:43, Thomas Munro wrote:
>> On Wed, May 27, 2020 at 7:09 PM Simon Riggs <simon@2ndquadrant.com> wrote:
>>> On Wed, 27 May 2020 at 04:27, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> The group of wal_init_zero and wal_recycle is WAL_SETTINGS in guc.c,
>>>> but their descriptions are located in "19.6. Replication"/"19.6.1. Sending
>>>> Servers" section. This seems a documentation bug. They should be located
>>>> in "19.5. Write Ahead Log"/"19.5.1. Settings". Thought?
>>>
>>>
>>> +1
> 
> Thanks! Patch attached.
> Since they are located just before wal_buffers in postgresql.conf.sample,
> I moved the descriptions of them also just before that of wal_buffers
> in "Write Ahead Log"/"Settings" section.

Barring any objection, I will commit this patch.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: wal_init_zero and wal_recycle
  2020-05-27 03:27 wal_init_zero and wal_recycle Fujii Masao <masao.fujii@oss.nttdata.com>
  2020-05-27 07:08 ` Re: wal_init_zero and wal_recycle Simon Riggs <simon@2ndquadrant.com>
  2020-05-27 23:43   ` Re: wal_init_zero and wal_recycle Thomas Munro <thomas.munro@gmail.com>
  2020-05-29 04:13     ` Re: wal_init_zero and wal_recycle Fujii Masao <masao.fujii@oss.nttdata.com>
  2020-06-02 05:25       ` Re: wal_init_zero and wal_recycle Fujii Masao <masao.fujii@oss.nttdata.com>
@ 2020-06-03 01:16         ` Fujii Masao <masao.fujii@oss.nttdata.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2020-06-03 01:16 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@gmail.com>; Simon Riggs <simon@2ndquadrant.com>; +Cc: pgsql-docs@lists.postgresql.org



On 2020/06/02 14:25, Fujii Masao wrote:
> 
> 
> On 2020/05/29 13:13, Fujii Masao wrote:
>>
>>
>> On 2020/05/28 8:43, Thomas Munro wrote:
>>> On Wed, May 27, 2020 at 7:09 PM Simon Riggs <simon@2ndquadrant.com> wrote:
>>>> On Wed, 27 May 2020 at 04:27, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> The group of wal_init_zero and wal_recycle is WAL_SETTINGS in guc.c,
>>>>> but their descriptions are located in "19.6. Replication"/"19.6.1. Sending
>>>>> Servers" section. This seems a documentation bug. They should be located
>>>>> in "19.5. Write Ahead Log"/"19.5.1. Settings". Thought?
>>>>
>>>>
>>>> +1
>>
>> Thanks! Patch attached.
>> Since they are located just before wal_buffers in postgresql.conf.sample,
>> I moved the descriptions of them also just before that of wal_buffers
>> in "Write Ahead Log"/"Settings" section.
> 
> Barring any objection, I will commit this patch.

Pushed. Thanks!

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION





^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2020-06-03 01:16 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 03:27 wal_init_zero and wal_recycle Fujii Masao <masao.fujii@oss.nttdata.com>
2020-05-27 07:08 ` Simon Riggs <simon@2ndquadrant.com>
2020-05-27 23:43   ` Thomas Munro <thomas.munro@gmail.com>
2020-05-29 04:13     ` Fujii Masao <masao.fujii@oss.nttdata.com>
2020-06-02 05:25       ` Fujii Masao <masao.fujii@oss.nttdata.com>
2020-06-03 01:16         ` Fujii Masao <masao.fujii@oss.nttdata.com>

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