Re: Switch pg_basebackup to use -X stream instead of -X fetch by default?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Switch pg_basebackup to use -X stream instead of -X fetch by default?
Date: 2014-08-28 16:35:07
Message-ID: CA+TgmoYxnbjb6M-TS_ism6cG6BvnDFNZDVPy+2T5NT=BmnxU5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 27, 2014 at 2:55 AM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Wed, Aug 27, 2014 at 5:16 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> On Wed, Aug 27, 2014 at 6:16 AM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>>> On Tue, Aug 26, 2014 at 10:46 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>>>> On 2014-08-26 16:41:44 -0400, Peter Eisentraut wrote:
>>>>> On 8/26/14 12:40 PM, Magnus Hagander wrote:
>>>>> > I think the first reason is gone now, and the risk/damage of the two
>>>>> > connections is probably smaller than running out of WAL. -x is a good
>>>>> > default for smaller systems, but -X is a safer one for bigger ones. So
>>>>> > I agree that changing the default mode would make sense.
>>>>>
>>>>> I would seriously consider just removing one of the modes. Having two
>>>>> modes is complex enough, and then having different defaults in different
>>>>> versions, and fuzzy recommendations like, it's better for "smaller
>>>>> systems", it's quite confusing.
>>>>
>>>> Happy with removing the option and just accepting -X for backward
>>>> compat.
>>>
>>> Works for me - this is really the cleaner way of doing it...
>>
>> We cannot use -X stream with tar output format mode. So I'm afraid that
>> removing -X fetch would make people using tar output format feel disappointed.
>> Or we should make -X stream work with tar mode.
>
> Ah, yes, I've actually had that on my TODO for some time.
>
> I think the easy way of doing that is to just create an xlog.tar file.
> Since we already create "base.tar" and possibly n*<tablespace.tar>,
> adding one more file shouldn't be a big problem, and would make such
> an implementation much easier. Would be trivial to do .tar.gz for it
> as well, just like for the others.

Still, that seems like a pretty good reason not to rip the old mode
out completely. Actually, I'd favor that anyway: changing the default
in one release and removing the deprecated feature in a later release
usually provides a smoother upgrade path. But if there are features
that aren't even present in the newer mode yet, that's an even better
reason.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Steve Crawford 2014-08-28 17:16:34 Re: Why data of timestamptz does not store value of timezone passed to it?
Previous Message Alexey Klyukin 2014-08-28 16:33:17 Re: implement subject alternative names support for SSL connections