Re: Documentation for initdb option --waldir - Mailing list pgsql-docs

From David G. Johnston
Subject Re: Documentation for initdb option --waldir
Date
Msg-id CAKFQuwba2Rmf4X5yAkxARyy8X=Lv_4sN9vE7Z5exJji3d+7M2g@mail.gmail.com
Whole thread Raw
In response to Documentation for initdb option --waldir  (PG Doc comments form <noreply@postgresql.org>)
Responses Re: Documentation for initdb option --waldir
List pgsql-docs
On Wed, Mar 26, 2025 at 2:35 AM PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/17/app-initdb.html
Description:

Hi all,

During troubleshooting with a customer we found that it might help to know
that initdb will create a symbolic link from data/pg_wal to the custom
directory with the option --waldir.


Thank you for the observation.  This indeed seems like something we should cover in a bit more detail.  How does the proposed patch (attached) look?

The main initdb change, added to Notes, is:

The pg_wal subdirectory will always exist within the data directory. This is where PostgreSQL sends its write-ahead log (WAL) files. Specifying the --waldir option turns this subdirectory entry into a symbolic link. In general, this is only useful if the remote location is on a different physical device. An existing directory must be empty and should not be a mount point. The directory will be created (including missing parents) if necessary.

David J.

Attachment

pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: Documentation for initdb option --waldir
Next
From: Laurenz Albe
Date:
Subject: Re: Documentation for initdb option --waldir