Re: Documentation for initdb option --waldir

From: Robert Treat <rob(at)xzilla(dot)net>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Euler Taveira <euler(at)eulerto(dot)com>, Theodor Herlo <t(dot)herlo(at)proventa(dot)de>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Documentation for initdb option --waldir
Date: 2025-03-27 21:28:40
Message-ID: CABV9wwN8nafxG8MdfEuHPxMhxr9SmGAoWKLBNr=9Ja6q9=1N+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Thu, Mar 27, 2025 at 12:06 PM David G. Johnston
<david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
> Version 2 Attached
>
> - This option specifies the directory where the write-ahead log
> - should be stored.
> + This option specifies the directory in which to store write-ahead log files.
> + See <xref linkend="wal-internals-relocation"/> for more information.

To be honest, I think the proposed text is a little verbose, and we
could cut it right here. As an example, we don't go into how the
directory must be empty or chnmod settings for --pgdata. I'd also edit
the pg_basebackup changes to match if it were me.

> + the <option>--waldir</option> option. On an existing, but not running,
> + cluster use operating system commands to move the contents of the
> + <filename>pg_wal</filename> directory to the new location, remove the
> + empty directory, and create the symbolic link named <filename>pg_wal</filename>
> + pointing to the new location.

I found this to be awkward to read, and not as significant a warning
as the existing text... perhaps "For an existing cluster, once the
cluster has been shut down, you can use operating system commands... "

> There being two places now (plus doing it manually) I decided to write this material in the WAL chapter as opposed to application-specific Notes. A new section seemed warranted.
>

+1

> I expanded upon the material regarding using different file systems and disks.
>
> I would like to add a similar "why" to the mount point recommendation but don't know what that would be. Suggestions welcomed.
>

I'm not sure I follow what you are asking for... but a non-performance
reason to use a seperate mount point for pg_wal, even if the
underlying storage is the same, would be for something like using
filesystem snapshots to grab contents of the data directory without
grabbing wal (which can be handled separately).

Robert Treat
https://xzilla.net

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2025-03-27 21:56:28 Re: Documentation for initdb option --waldir
Previous Message David G. Johnston 2025-03-27 16:06:15 Re: Documentation for initdb option --waldir