Monday, February 2, 2015

How to create symlink for pg_xlog when all ready in production.

1. Need create direcotry where you want to link directory:

Example:


mkdir /pg_xlog/pg_xlog92


chown -R postgres:postggre /pg_xlog/pg_xlog92


2. By using rsync command sync data from pg_xlog to /pg_xlog/pg_xlog92


Example:


rsync -r /pg_xlog/  /pg_xlog/pg_xlog92


3. Shutdown the cluster and move the pg_xlog as pg_xlog_old.


Example:


mv pg_xlog pg_xlog_old


4. Move pg_xlog92 from pg_xlog_old


Example:


cd pg_xlog


mv pg_xlog ../


5. Start your cluster.

No comments:

Post a Comment