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.

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


Run /usr/pgsql-9.1/bin/pg_ctl stop -m fast to stop PostgreSQL.


Run mv PathToPreferredDisk/data/pg_xlog /var/tmp/ to move the logs.


Run ln -s /var/tmp/pg_xlog PathToPreferredDisk/data/pg_xlog to create a symbolic link to the new location of the pg_xlog .


Run /usr/pgsql-9.1/bin/pg_ctl -D $PGDATA -l $PGDATA/pg_log/logfile start to restart PostgreSQL.

Define the PostgreSQL environment variables. See Define PostgreSQL Environment Variables