воскресенье, 27 марта 2011 г.

switch postgresql from standby to normal mode.

After configure hot standby on postgresql 9.0, i configure heartbeat for switch slave server to master.
require add to recovery.conf this line
trigger_file = '/var/lib/pgsql/9.0/data/MASTER'

And after
touch /var/lib/pgsql/9.0/data/MASTER
and service postgresql-9.0 restart
server work as read/write server.

for return to standby require sync db files between master and slave
and
mv /var/lib/pgsql/9.0/data/recovery.done /var/lib/pgsql/9.0/data/recovery.conf
and again restart postgresql server

Комментариев нет: