Subject: Change WAL directory via conf

From: Thomas Butz <[email-masked]>
Date: Fri, 27 Feb 2026 14:50:15 +0100 (CET)

Is there a reason why the location of the WAL directory cannot be specified via the configuration?
The documentation describes a workaround using a symbolic link, which I find rather awkward:

https://www.postgresql.org/docs/current/wal-internals.html

Why is there no wal_directory analogous to data_directory?

-- 
Thomas Butz

---

From: "David G. Johnston" <[email-masked]>
Date: Fri, 27 Feb 2026 07:36:14 -0700

> Why is there no wal_directory analogous to data_directory?

WAL is data in the sense of what data_directory covers.  Both it and the
main files can be placed outside the physical directory so long as those
external locations can be navigated to by symbolic links.  The fact initdb
provides for this means it’s supported just fine.  Just no one has bothered
to make a server program to perform that same work post-initdb.  An SQL
command is not possible though, we aren’t going to be able to move WAL
while the server is running for hopefully self-evident reasons.

David J.