Synchronization Master -> Slave (on slow connetion)

From: Edson Richter <edsonrichter(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Synchronization Master -> Slave (on slow connetion)
Date: 2012-07-19 11:45:41
Message-ID: BLU0-SMTP170E9FDA4E4617E4C69F53ACFD90@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've serious problems with slow link between continents, and twice a
week I have to manually reestablish the slave, by running the following
script:

------------------------------------------------------------------------------------------------------------------------------------------

psql -c "SELECT pg_start_backup('standby_sync', true)"
rsync --progress -a ${PGDATA}/*
root(at)server2(dot)mycompany(dot)com:/opt/pgsql/slave1/ --exclude postmaster.pid
--exclude postgresql.conf --exclude pg_hba.conf --exclude pg_log
--exclude pg_xlog
psql -c "SELECT pg_stop_backup()"

------------------------------------------------------------------------------------------------------------------------------------------

Point is not to analyze the connection issues between the continents,
but if there is a way better to synchronize these servers, and avoid to
transport 8Gb of data between them when syncronizing.
The rsync above can be optimized? Both servers are CentOS 5 with OpenVPN
established between them (this is one of the problems: the VPN keep
falling several times a day, and then finally, the sender and receiver
process just vanish in the air - and I had no time to investigate the
vanishment).

Thanks in advance for your help,

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Law 2012-07-19 11:50:44 Re: [GENERAL] main log encoding problem
Previous Message Edson Richter 2012-07-19 11:35:29 Synchronization Master -> Slave