Tuesday, January 10, 2012

Postgresql - the pg_xlog directory

I'll talk about this topic on the light of my previous entry:
The sub-directory pg_xlog inside the database cluster ($PGDATA) keeps transaction logs (or Write Ahead Log - WAL).

I noticed that when archiving is enabled a couple of WAL segments are kept here and it's only after a pg_switch_pgxlog(), that they're transfered to the target archiving directory.

In the docs they mention that it's wise to keep this directory on a separate device for performance reasons, by making a symbolic link to a directory outside the data cluster.

If you don't specify a restore command or if it fails consistently , pg_xlog will grow indefinitely, that's one good thing to have in mind.

No comments:

Post a Comment