Both look great to me! I thought the advantage of having different devices is also to easy I/O load. But I guess you have to decide for yourself what is the best strategy. For me it was important to know what initdb does with ---waldir. And this is nicely explained here. One more little thing, I stumbled across " should not be a mount point", sounds thirst like it was not good to use the mount point. Maybe: " should not be the mount point itself but a directory in the mount point". It might be only me, you diced.
Thank you very much! Regards, Theo -----Ursprüngliche Nachricht----- Von: Laurenz Albe <laurenz.a...@cybertec.at> Gesendet: Donnerstag, 27. März 2025 11:32 An: David G. Johnston <david.g.johns...@gmail.com>; Theodor Herlo <t.he...@proventa.de>; pgsql-docs@lists.postgresql.org Betreff: Re: Documentation for initdb option --waldir [Sie erhalten nicht häufig E-Mails von laurenz.a...@cybertec.at. Weitere Informationen, warum dies wichtig ist, finden Sie unter https://aka.ms/LearnAboutSenderIdentification ] On Wed, 2025-03-26 at 17:34 -0700, David G. Johnston wrote: > + <para> > + The <filename>pg_wal</filename> subdirectory will always exist within the > + data directory. This is where <productname>PostgreSQL</productname> > + sends its write-ahead log (<acronym>WAL</acronym>) files. > + Specifying the <option>--waldir</option> 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. > + </para> I think that it is very valuable to have WAL on a different file system on the same storage device. The idea is that growing data files cannot exhaust the space available for WAL. How about this: There is always a <filename>pg_wal</filename> within the data directory. By default, it is a directory where <productname>PostgreSQL</productname> places its write-ahead log (<acronym>WAL</acronym>) segment files. If you create the <acronym>WAL</acronym> location somewhere else using the option <option>--waldir</option>, <filename>pg_wal</filename> will be created as a symbolic link pointing to that <acronym>WAL</acronym> location. If the directory already exists, it must be empty and should not be a mount point. The directory will be created (including missing parents) if necessary. Yours, Laurenz Albe