pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: David G. Johnston <david.g.johnston@gmail.com>
To: t.herlo@proventa.de
To: pgsql-docs@lists.postgresql.org
Subject: Re: Documentation for initdb option --waldir
Date: Thu, 27 Mar 2025 11:32:18 +0100
Message-ID: <1f38ffb000b9ead35702a63191c28f36e259c7d1.camel@cybertec.at> (raw)
In-Reply-To: <CAKFQuwba2Rmf4X5yAkxARyy8X=Lv_4sN9vE7Z5exJji3d+7M2g@mail.gmail.com>
References: <174291831170.676.262776479364497352@wrigleys.postgresql.org>
	<CAKFQuwba2Rmf4X5yAkxARyy8X=Lv_4sN9vE7Z5exJji3d+7M2g@mail.gmail.com>

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





view thread (14+ messages)  latest in thread

Message-ID: <1f38ffb000b9ead35702a63191c28f36e259c7d1.camel@cybertec.at>
Permalink:  ../1f38ffb000b9ead35702a63191c28f36e259c7d1.camel@cybertec.at/
Also on:    postgresql.org/message-id/1f38ffb000b9ead35702a63191c28f36e259c7d1.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: laurenz.albe@cybertec.at, david.g.johnston@gmail.com, t.herlo@proventa.de, pgsql-docs@lists.postgresql.org
  Subject: Re: Documentation for initdb option --waldir
  In-Reply-To: <1f38ffb000b9ead35702a63191c28f36e259c7d1.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox