Re: Streaming base backups - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Streaming base backups
Date
Msg-id AANLkTi=Urjq8rz+y4GjJ8Gj6FtJfHkv=fK7J7+KJaN78@mail.gmail.com
Whole thread Raw
In response to Re: Streaming base backups  (Tatsuo Ishii <ishii@postgresql.org>)
Responses Re: Streaming base backups  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
On Mon, Jan 17, 2011 at 03:32, Tatsuo Ishii <ishii@postgresql.org> wrote:
>>> Good point. I have been always wondering why we can't use exiting WAL
>>> transporting infrastructure for sending/receiving WAL archive
>>> segments in streaming replication.
>>> If my memory serves, Fujii has already proposed such an idea but was
>>> rejected for some reason I don't understand.
>>
>> I must be confused, because you can use backup_command/restore_command
>> to transport WAL segments, in conjunction with streaming replication.
>
> Yes, but using restore_command is not terribly convenient. On
> Linux/UNIX systems you have to enable ssh access, which is extremely
> hard on Windows.

Agreed.


> IMO Streaming replication is not yet easy enough to set up for
> ordinary users. It is already proposed that making base backup easier
> and I think it's good. Why don't we go step beyond a little bit more?

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?

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.


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

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Recovery control functions
Next
From: Magnus Hagander
Date:
Subject: Re: Replication logging