Re: streaming replication

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: streaming replication
Дата
Msg-id 4EB7BC8B0200002500042AFF@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: streaming replication  (Alex Lai <alai@sesda2.com>)
Ответы Re: streaming replication  (Scott Ribe <scott_ribe@elevated-dev.com>)
Список pgsql-admin
Alex Lai <alai@sesda2.com> wrote:
> Fujii Masao wrote:

>> 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.

> 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.

If the bottleneck is the network, be sure that you are using a
daemon on the remote side; otherwise you do drag all the data over
the wire for any file which doesn't have an identical timestamp and
size.  An example of how to do that from the rsync man page:

rsync -av -e "ssh -l ssh-user" rsync-user@host::module /dest

This will try to identify matching portions of files and avoid
sending them over the wire.

-Kevin

В списке pgsql-admin по дате отправления:

Предыдущее
От: Scott Ribe
Дата:
Сообщение: Re: streaming replication
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: pg_dump from 8.4 to 8.3