From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Boszormenyi Zoltan <zb(at)cybertec(dot)at> |
Cc: | Amit Kapila <amit(dot)kapila(at)huawei(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Hans-Jürgen Schönig <hs(at)cybertec(dot)at>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net> |
Subject: | Re: [PATCH] Make pg_basebackup configure and start standby [Review] |
Date: | 2012-10-14 16:10:55 |
Message-ID: | CAHGQGwGQA2guD0+2pc_c7wVenJvi_hoYMdfFqFfv_1g6kHQ+QA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Oct 15, 2012 at 12:57 AM, Boszormenyi Zoltan <zb(at)cybertec(dot)at> wrote:
> 2012-10-11 02:02 keltezéssel, Fujii Masao írta:
>
>> On Thu, Oct 11, 2012 at 3:36 AM, Boszormenyi Zoltan <zb(at)cybertec(dot)at>
>> wrote:
>>>
>>> 2012-10-10 18:23 keltezéssel, Fujii Masao írta:
>>>>
>>>> When tar output format is specified together with -R option,
>>>> recovery.conf
>>>> is
>>>> not included in base.tar. I think it should.
>>>
>>>
>>> Why? This patch only promises to write the recovery.conf into the
>>> directory specified with -D.
>>
>> Because it's more user-friendly. If recovery.conf is not included in
>> base.tar,
>> when base.tar is extracted to disk to use the backup, a user always needs
>> to copy recovery.conf to the extracted directory. OTOH if it's included in
>> base.tar, such copy operation is not required and we can simplify the
>> procedures to use the backup a bit.
>
>
> It's implemented now.
Thanks a lot!
>>>> + setting up the standby. Since creating a backup for a
>>>> standalone
>>>> + server with <option>-x</option> or <option>-X</option> and
>>>> adding
>>>> + a recovery.conf to it wouldn't make a working standby, these
>>>> options
>>>> + naturally conflict.
>>>>
>>>> Is this right? ISTM that basically we can use pg_basebackup -x to take
>>>> a base backup for starting the standby for now. No?
>>>
>>>
>>> I don't know. Pointers?
>>
>> There is no restriction that the backup which was taken by using
>> pg_basebackup -x cannot be used to start the standby. So I wonder
>> why -R option cannot work together with -x. It's useful if recovery.conf
>> is automatically written even with pg_basebackup -x.
>
>
> There was a problem with 9.0.x (maybe even with 9.1) that the backup
> failed to come up as a standby if -x or -X was specified. I don't know
> if it was a bug, limitation or intended behaviour.
It sounds a bug to me. It's helpful if you provide the self-contained test case.
> Before removing the check for conflicting options, I would like to ask:
> is there such a known conflict with --xlog-method=stream?
AFAIK, No, we can use the backup which pg_basebackup --xlog-method=stream
took, to start the standby. BTW, --xlog-method=stream cannot be specified
together with -F tar.
>> And I found another problem: when -(stdout) is specified in -D option,
>> recovery.conf fails to be written.
>>
>> $ pg_basebackup -D- -F t -c fast -R > hoge.tar
>> NOTICE: WAL archiving is not enabled; you must ensure that all
>> required WAL segments are copied through other means to complete the
>> backup
>> pg_basebackup: cannot create -/recovery.conf: No such file or directory
>
>
> Now it works with recovery.conf written into the tar itself. I also tried
>
> $ pg_basebackup -D- -Ft -R
>
> and the directory named "-" was created and of course the recovery.conf
> inside it. Is this the intended behaviour regarding "stdout is to be treated
> as a directory"?
Yes. Thanks.
Regards,
--
Fujii Masao
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-10-14 16:35:10 | Re: Deprecating RULES |
Previous Message | Tom Lane | 2012-10-14 16:10:42 | Re: BUG #6510: A simple prompt is displayed using wrong charset |