From: | Theodor Herlo <t(dot)herlo(at)proventa(dot)de> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> |
Subject: | AW: Documentation for initdb option --waldir |
Date: | 2025-03-27 11:40:49 |
Message-ID: | FR3P281MB19197329968C1F5D6537C6D5F6A12@FR3P281MB1919.DEUP281.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
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(dot)albe(at)cybertec(dot)at>
Gesendet: Donnerstag, 27. März 2025 11:32
An: David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>; Theodor Herlo <t(dot)herlo(at)proventa(dot)de>; pgsql-docs(at)lists(dot)postgresql(dot)org
Betreff: Re: Documentation for initdb option --waldir
[Sie erhalten nicht häufig E-Mails von laurenz(dot)albe(at)cybertec(dot)at(dot) 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
From | Date | Subject | |
---|---|---|---|
Next Message | Euler Taveira | 2025-03-27 12:56:22 | Re: Documentation for initdb option --waldir |
Previous Message | Laurenz Albe | 2025-03-27 10:32:18 | Re: Documentation for initdb option --waldir |