Postgresql – How to change the Write Ahead Log directory on Windows

postgresqlwrite-ahead-logging

On postgres 9.6 for Windows server 2008. How do I change the Write Ahead Log directory?

Thanks.

Best Answer

From the docs

WAL logs are stored in the directory pg_wal under the data directory, as a set of segment files [...]

The docs go on to day,

It is advantageous if the log is located on a different disk from the main database files. This can be achieved by moving the pg_wal directory to another location (while the server is shut down, of course) and creating a symbolic link from the original location in the main data directory to the new location.

So your options are simple on Windows