Re: Streaming base backups

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, robertmhaas(at)gmail(dot)com, dimitri(at)2ndquadrant(dot)fr, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Streaming base backups
Date: 2011-01-17 10:18:06
Message-ID: 87pqrvesv5.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander <magnus(at)hagander(dot)net> writes:
> With pg_basebackup, you can set up streaming replication in what's
> basically a single command (run the base backup, copy i na
> recovery.conf file). In my first version I even had a switch that
> would create the recovery.conf file for you - should we bring that
> back?

+1. Well, make it optional maybe?

> It does require you to set a "reasonable" wal_keep_segments, though,
> but that's really all you need to do on the master side.

Until we get integrated WAL streaming while the base backup is ongoing.
We don't know when that is (9.1 or future), but that's what we're aiming
to now, right?

>>> What Fujii-san unsuccessfully proposed was to have the master restore
>>> segments from the archive and stream them to clients, on request.  It
>>> was deemed better to have the slave obtain them from the archive
>>> directly.
>>
>> Did Fuji-san agreed on the conclusion?
>
> I can see the point of the mastering being able to do this, but it
> seems like a pretty narrow usecase, really. I think we invented
> wal_keep_segments partially to solve this problem in a neater way?

Well I still think that the easier setup we can offer here is to ship
with integrated libpq based archive and restore commands. Those could
be bin/pg_walsender and bin/pg_walreceiver. They would have some
switches to make them suitable for running in subprocesses of either the
base backup utility or the default libpq based archive daemon.

Again, all of that is not forcibly material for 9.1, despite having all
the pieces already coded and tested, mainly in Magnus hands. But could
we get agreement about going this route?

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2011-01-17 10:29:48 Re: Bug in walreceiver
Previous Message Fujii Masao 2011-01-17 10:14:42 Re: pg_basebackup for streaming base backups