pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alex Lai <alai@sesda2.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Karuna Karpe <karuna.karpe@os3infotech.com>
Cc: Vinay <vinay.dhoom@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: streaming replication
Date: Mon, 07 Nov 2011 11:13:05 -0500
Message-ID: <4EB80391.1020809@sesda2.com> (raw)
In-Reply-To: <CAHGQGwHn8DLQF1vPaizJzwtFk+Y0ciML-zjXct_y6NmZ+BFy6g@mail.gmail.com>
References: <CAC-Lqbq7mKzxcNG+cRtUT2vNqh=qY6kXttLeumQkd5vdEsbTVg@mail.gmail.com>
	<CACP4ndiOQZfQ1W5NVNTp0Xvan_RQC+9zQ3=FDe8H1K5szPj+SQ@mail.gmail.com>
	<CAC-Lqbpb5-vETngn-Sc=ab3T=HdWT5GarOpaUjA2O3UuyZ922g@mail.gmail.com>
	<CAHGQGwHn8DLQF1vPaizJzwtFk+Y0ciML-zjXct_y6NmZ+BFy6g@mail.gmail.com>

Fujii Masao wrote:
> On Wed, Nov 2, 2011 at 4:48 PM, Karuna Karpe
> <karuna.karpe@os3infotech.com> wrote:
>   
>> But I want huge amount of data in database. so it is take so much to take
>> dump from slave db and load in master db.
>> for example :-
>>         I have one master db server with 20GB of data and two slave db
>> server are replicated from master server.  when my master db server is fail,
>> then one of slave server become new master server.  In new master server
>> 50MB of data add into database.  After some time my failed(old) master back
>> up, then I want to become my old master server as master and my new master
>> server become slave(as previous setting). So please let me know that how
>> replication only that 50MB data into old master database server????
>>     
>
> What about using rsync to take a base backup from new master and load it
> onto old master? rsync can reduce the backup time by sending only differences
> between those two servers.
>
> Regards,
>
>   
My postgres instance has two databases.  The pg_dump size is about 30GB 
size.  Rsync the entire $PGDATA take about an hour to a empty 
directory.  When I rsync the $PGDATA to the existing directory, it still 
take 50 minutes.  It seems to me that rsync still spend most of the time 
checking any changes even with very little changes.  Maybe I miss some 
option when using rsync can speed up the update.

-- 
Best regards,


Alex Lai
alai@sesda2.com




view thread (13+ messages)  latest in thread

Message-ID: <4EB80391.1020809@sesda2.com>
Permalink:  ../4EB80391.1020809@sesda2.com/
Also on:    postgresql.org/message-id/4EB80391.1020809@sesda2.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alai@sesda2.com, masao.fujii@gmail.com, karuna.karpe@os3infotech.com, vinay.dhoom@gmail.com
  Subject: Re: streaming replication
  In-Reply-To: <4EB80391.1020809@sesda2.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox