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

From PG Doc comments form
Subject Documentation for initdb option --waldir
Date
Msg-id 174291831170.676.262776479364497352@wrigleys.postgresql.org
Whole thread Raw
Responses Re: Documentation for initdb option --waldir
List pgsql-docs
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.
https://www.postgresql.org/docs/current/app-initdb.html
For instance:
This option specifies the directory where the write-ahead log should be
stored. A symbolic link is created from pg_wal in the main data directory to
the specified location.
(Like in this documentation https://pgpedia.info/p/pg_wal.html, but there is
a typo or missing word in the initdb section: "A symbolic link from pg_wal
in the main data directory to the specified location.")

And maybe also here a hint, that moving the pg_wal directory to another
location and creating a symbolic is what initdb --waldir does.
https://www.postgresql.org/docs/current/wal-internals.html
For instance:
It is advantageous if the WAL is located on a different disk from the main
database files. This can be achieved by moving the pg_wal directory to
another location (while the server is shut down, of course) and creating a
symbolic link from the original location in the main data directory to the
new location. This is also what the --waldir initdb option does. 

Thank you very much and kind regards
Theo

pgsql-docs by date:

Previous
From: Rene Saarsoo
Date:
Subject: Re: SEQUENCE NAME syntax not documented for ALTER TABLE
Next
From: "David G. Johnston"
Date:
Subject: Re: Documentation for initdb option --waldir