Re: streaming replication - Mailing list pgsql-admin

From Alex Lai
Subject Re: streaming replication
Date
Msg-id 4EB80391.1020809@sesda2.com
Whole thread Raw
In response to Re: streaming replication  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: streaming replication
Re: streaming replication
List pgsql-admin
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


pgsql-admin by date:

Previous
From: Jelena
Date:
Subject: PostgreSQL statement latency
Next
From: Kieren Scott
Date:
Subject: pg_dump from 8.4 to 8.3