snippetsqlMinor
How to change the Write Ahead Log directory
Viewed 0 times
directorythelogchangewritehowahead
Problem
How do you change the defined WAL directory?
During the installation I defined a directory,
How do I change the postgres setting to write the WAL files elsewhere - without having to re-install?
During the installation I defined a directory,
/var/lib/wal and the $PGDATA/pg_xlog has a symbolic link pointing to that directory.How do I change the postgres setting to write the WAL files elsewhere - without having to re-install?
Solution
This can be done according to the documentation [here]:(http://www.postgresql.org/docs/9.1/static/wal-internals.html)
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_xlog
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.
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_xlog
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.
Context
StackExchange Database Administrators Q#135048, answer score: 4
Revisions (0)
No revisions yet.