[GENERAL] Setting up replication slave on remote high latency host - Mailing list pgsql-general

From Rory Falloon
Subject [GENERAL] Setting up replication slave on remote high latency host
Date
Msg-id CANP_6+MUnqaSNA+85aM8g+ZXefomoAzpS_pZQMypTwS_t9c9ag@mail.gmail.com
Whole thread Raw
Responses Re: [GENERAL] Setting up replication slave on remote high latencyhost  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
Hi,

Thoughts and opinions on this please -

I have a db (data dir is 90gb) that I am trying to setup on a replication slave. The slave is on a host which maintains latency over 300ms at all times (wan link). 

Other times I have done this setup, I have simply rsync'ed the data dir to another host, set config, ran rsync again and fired up the slave. this works well.

However, my bandwidth to the host in question fluctuates between 800k/sec to 3MB/sec. Performing this initial rsync and then having to rsync again if the replication slave drops out due to network latency is not something I think is going to work in this situation.

Right now I am trying to dump the database, gzip, move across, and import into the new slave (which is configured as a master to perform the initial setup). Ideally I do this dump, move and import during a period of inactivity on the master so the new server will come up and immediately be able to catch up on replication due to lack of activity. However, I have been importing the current db as a test and after 90 minutes it seems to have only got 2/3 of the way. I am not confident this will work but it seems like the most efficient way to start.

Have I missed anything here?

Now, assuming I get the slave up, how best can I mitigate the slave from dropping out because of latency and being able to recover? Increasing the amount of wal segments would be the best way, correct?

Thanks,

pgsql-general by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: [GENERAL] PGPool in Master-Master mode, is it possible?
Next
From: John R Pierce
Date:
Subject: Re: [GENERAL] Setting up replication slave on remote high latencyhost