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