Re: Simplifying replication

Поиск
Список
Период
Сортировка
Искать
От
Hannu Krosing
Тема
Re: Simplifying replication
Дата
Msg-id
1288996741.2313.370.camel@hvost
Ответ на
Re: Simplifying replication (Dimitri Fontaine)
Список
Дерево обсуждения
Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Greg Smith <greg@2ndquadrant.com>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Greg Smith <greg@2ndquadrant.com>
Re: Simplifying replication Robert Treat <rob@xzilla.net>
Re: Simplifying replication Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Re: Simplifying replication Brendan Jurd <direvus@gmail.com>
Re: Simplifying replication Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: Simplifying replication Hannu Krosing <hannu@2ndQuadrant.com>
Re: Simplifying replication Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: Simplifying replication Hannu Krosing <hannu@2ndQuadrant.com>
Re: Simplifying replication Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Greg Stark <gsstark@mit.edu>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Bruce Momjian <bruce@momjian.us>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Greg Stark <gsstark@mit.edu>
Re: Simplifying replication Robert Haas <robertmhaas@gmail.com>
Re: Simplifying replication Simon Riggs <simon@2ndQuadrant.com>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Robert Haas <robertmhaas@gmail.com>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Robert Haas <robertmhaas@gmail.com>
Re: Simplifying replication Bruce Momjian <bruce@momjian.us>
Re: Simplifying replication Robert Haas <robertmhaas@gmail.com>
Re: Simplifying replication Bruce Momjian <bruce@momjian.us>
Re: Simplifying replication Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: Simplifying replication Robert Haas <robertmhaas@gmail.com>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Robert Haas <robertmhaas@gmail.com>
Re: Simplifying replication Simon Riggs <simon@2ndQuadrant.com>
Re: Simplifying replication Robert Haas <robertmhaas@gmail.com>
Re: Simplifying replication Bruce Momjian <bruce@momjian.us>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Simplifying replication Tom Lane <tgl@sss.pgh.pa.us>
Re: Simplifying replication Bruce Momjian <bruce@momjian.us>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Robert Haas <robertmhaas@gmail.com>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Fujii Masao <masao.fujii@gmail.com>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Tom Lane <tgl@sss.pgh.pa.us>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Fujii Masao <masao.fujii@gmail.com>
Re: Simplifying replication Josh Berkus <josh@agliodbs.com>
Re: Simplifying replication Robert Haas <robertmhaas@gmail.com>
Re: Simplifying replication Robert Haas <robertmhaas@gmail.com>
Re: Simplifying replication Dimitri Fontaine <dimitri@2ndQuadrant.fr>
On Tue, 2010-10-19 at 10:31 +0200, Dimitri Fontaine wrote:

> > 4. I can start a new replica off the master by running a single command-line
> > utility on the standby and giving it connection information to the master.
> > Using this connection, it should be able to start a backup snapshot, copy
> > the entire database and any required logs, and then come up in standby mode.
> > All that should be required for this is one or two highport connections to
> > the master.  No recovery.conf file is required, or exists.
> 
> There's a prototype to stream a base backup from a libpq connection, I
> think someone here wanted to integrate that into the replication
> protocol itself. It should be doable with a simple libpq connection and
> all automated.
> 
> The pg_basebackup python client software is 100 lines of code. It's
> mainly a recursive query to get the list of files within the master,
> then two server side functions to get binary file chunks,
> compressed. Then client side, a loop to decompress and write the chunks
> at the right place. That's it.
> 
>   http://github.com/dimitri/pg_basebackup/blob/master/pg_basebackup.py
> 
> I could prepare a patch given some advice on the replication protocol
> integration. For one, is streaming a base backup something that
> walsender should care about?

To make pg_basebackup.py self-sufficient it should also open 2nd
connection to the same master and make sure that all WAL files are
copied for the duration of base copy.

This way you don't need to do anything extra to make sure you have
enough wal files. And if you fail because of filling up disks, you fail
on slave side, where it is less of a problem.

> > 
-- 
-------
Hannu Krosing
PostgreSQL Infinite Scalability and Preformance Consultant
PG Admin Book: http://www.2ndQuadrant.com/books/



В списке pgsql-hackers по дате отправления
От: Josh Berkus
Дата:
От: Tom Lane
Дата:
FAQ