Re: Updated version of pg_receivexlog

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Updated version of pg_receivexlog
Date: 2011-09-29 20:30:32
Message-ID: CABUevEypmoWyWdnaP2AfOENTE9=dp+LjtO8GEV3K6bU_jmWFPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 29, 2011 at 01:55, Jaime Casanova <jaime(at)2ndquadrant(dot)com> wrote:
> On Wed, Sep 28, 2011 at 12:50 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>>
>>> pg_receivexlog worked good in my tests.
>>>
>>> pg_basebackup with --xlog=stream gives me an already recycled wal
>>> segment message (note that the file was in pg_xlog in the standby):
>>> FATAL:  could not receive data from WAL stream: FATAL:  requested WAL
>>> segment 00000001000000000000005C has already been removed
>>
>> Do you get this reproducibly? Or did you get it just once?
>>
>> And when you say "in the standby" what are you referring to? There is
>> no standby server in the case of pg_basebackup --xlog=stream, it's
>> just backup... But are you saying pg_basebackup had received the file,
>> yet tried to get it again?
>>
>
> ok, i was trying to setup a standby server cloning with
> pg_basebackup... i can't use it that way?
>
> the docs says:
> """
> If this option is specified, it is possible to start a postmaster
> directly in the extracted directory without the need to consult the
> log archive, thus making this a completely standalone backup.
> """
>
> it doesn't say that is not possible to use this for a standby
> server... probably that's why i get the error i put a recovery.conf
> after pg_basebackup finished... maybe we can say that  more loudly?

The idea is, if you use it with -x (or --xlog), it's for taking a
backup/clone, *not* for replication.

If you use it without -x, then you can use it as the start of a
replica, by adding a recovery.conf.

But you can't do both at once, that will confuse it.

>>> in other things:
>>> do we need to include src/bin/pg_basebackup/.gitignore in the patch?
>>
>> Not sure what you mean? We need to add pg_receivexlog to this file,
>> yes - in head it just contains pg_basebackup.
>>
>
> your patch includes a modification in the file
> src/bin/pg_basebackup/.gitignore, maybe i'm just being annoying
> besides is a simple change... just forget that...

Well, it needs to be included inthe commit, and if I exclude it inthe
posted patch, I'll just forget it in the end :-)

--
 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 Kohei KaiGai 2011-09-29 20:52:57 Re: [v9.2] Object access hooks with arguments support (v1)
Previous Message Kevin Grittner 2011-09-29 18:27:05 Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build)