Re: Documentation for initdb option --waldir

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Robert Treat <rob(at)xzilla(dot)net>
Cc: Euler Taveira <euler(at)eulerto(dot)com>, Theodor Herlo <t(dot)herlo(at)proventa(dot)de>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Documentation for initdb option --waldir
Date: 2025-03-27 21:56:28
Message-ID: CAKFQuwYpmEUDVw2DTCs0v4J3g20BmZq_5HYgjpcFQfDt4Yy2+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Thu, Mar 27, 2025 at 2:28 PM Robert Treat <rob(at)xzilla(dot)net> wrote:

> On Thu, Mar 27, 2025 at 12:06 PM David G. Johnston
> <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> >
> > Version 2 Attached
> >
> > - This option specifies the directory where the write-ahead log
> > - should be stored.
> > + This option specifies the directory in which to store
> write-ahead log files.
> > + See <xref linkend="wal-internals-relocation"/> for more
> information.
>
> To be honest, I think the proposed text is a little verbose, and we
> could cut it right here. As an example, we don't go into how the
> directory must be empty or chnmod settings for --pgdata. I'd also edit
> the pg_basebackup changes to match if it were me.
>

Don't really see how completeness hurts here, but also not married to it.

>
> > + the <option>--waldir</option> option. On an existing, but not
> running,
> > + cluster use operating system commands to move the contents of the
> > + <filename>pg_wal</filename> directory to the new location, remove the
> > + empty directory, and create the symbolic link named
> <filename>pg_wal</filename>
> > + pointing to the new location.
>
> I found this to be awkward to read, and not as significant a warning
> as the existing text... perhaps "For an existing cluster, once the
> cluster has been shut down, you can use operating system commands... "
>

I'll probably put it back into parentheses to get the desired emphasis.
That did nag at me too as I wrote it.

> > There being two places now (plus doing it manually) I decided to write
> this material in the WAL chapter as opposed to application-specific Notes.
> A new section seemed warranted.
> >
>
> +1
>
> > I expanded upon the material regarding using different file systems and
> disks.
> >
> > I would like to add a similar "why" to the mount point recommendation
> but don't know what that would be. Suggestions welcomed.
> >
>
> I'm not sure I follow what you are asking for... but a non-performance
> reason to use a seperate mount point for pg_wal, even if the
> underlying storage is the same, would be for something like using
> filesystem snapshots to grab contents of the data directory without
> grabbing wal (which can be handled separately).
>
>
If I mount the filesystem on disk2 to: /mnt/disk2
Why do I need to create "/mnt/disk2/wal_files/" and point there instead of:
"/mnt/disk2/"?

David J.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2025-03-29 06:19:24 Creating first database
Previous Message Robert Treat 2025-03-27 21:28:40 Re: Documentation for initdb option --waldir