Most efficient way to initialize a standby server

From: Edson Richter <edsonrichter(at)hotmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Most efficient way to initialize a standby server
Date: 2013-05-28 00:08:43
Message-ID: BLU0-SMTP149659588D2A071CF50CB68CF970@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've two distant servers I would like to configure async replication
between.

Servers are running 9.2.4.

Since 9.0 days I do use script with rsync for transfer. And sometimes
the servers get out of sync (due large processing in master database and
huge network latency), and I have to reinitialize the standby server.

Lately , this script take about an hour to copy all data (23GB) over the
standby server, and I would like to know if there is a more efficient
way (perhaps, using pg_basebackup?) to reinitilize the standby server.

I've look in wiki pages and also pg_basebackup, but information on how
to get data transfered to the remote standby server is vague.

Or should I run pg_basebackup from standby server, and the PostgreSQL
protocol is more efficient than rsync?

Thanks,

Edson

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Konoplev 2013-05-28 00:43:44 Re: Most efficient way to initialize a standby server
Previous Message bricklen 2013-05-27 21:27:14 Re: search_path for database vs user vs session