Documentation for initdb option --waldir

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: t(dot)herlo(at)proventa(dot)de
Subject: Documentation for initdb option --waldir
Date: 2025-03-25 15:58:31
Message-ID: 174291831170.676.262776479364497352@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2025-03-27 00:34:44 Re: Documentation for initdb option --waldir
Previous Message Rene Saarsoo 2025-03-23 16:25:17 Re: SEQUENCE NAME syntax not documented for ALTER TABLE