Depending on your environment, you might select a location other than the default for data files. For example, you might choose to store data files on a volume with plenty of space for housekeeping operations. In the event that your I/O device is saturated, the procedure that you use differs from the usual process.

About this task

If you do not have an I/O device that is saturated, use the process described in Define Data and Log Locations.


  1. Run /usr/pgsql-9.1/bin/pg_ctl stop -m fast to stop PostgreSQL.
  2. Run mv PathToPreferredDisk/data/pg_xlog /var/tmp/ to move the logs.
  3. Run ln -s /var/tmp/pg_xlog PathToPreferredDisk/data/pg_xlog to create a symbolic link to the new location of the pg_xlog .
  4. Run /usr/pgsql-9.1/bin/pg_ctl -D $PGDATA -l $PGDATA/pg_log/logfile start to restart PostgreSQL.

What to do next

Define the PostgreSQL environment variables. See Define PostgreSQL Environment Variables