Re: Streaming base backups

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: 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 06:52:28
Message-ID: AANLkTi=Urjq8rz+y4GjJ8Gj6FtJfHkv=fK7J7+KJaN78@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 17, 2011 at 03:32, Tatsuo Ishii <ishii(at)postgresql(dot)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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2011-01-17 06:53:15 Re: Replication logging
Previous Message Magnus Hagander 2011-01-17 06:50:33 Re: Recovery control functions