pgsql: pg_basebackup streaming: adjust version check msg

Поиск
Список
Период
Сортировка
Искать

pgsql: pg_basebackup streaming: adjust version check msg

От:
Simon Riggs <simon@2ndQuadrant.com>
Дата:
pg_basebackup streaming: adjust version check msg

Commit d298b50a3b469c088bb40a4d36d38111b4cd574d by Heikki Linnakangas
requested that the version check message be updated at next release, suggesting
that the appropriate text would be “9.3 or later”. The logic used for the check
indicates that the correct text for 9.4 is “9.3 or 9.4”, since the logic would
cause this to fail for later releases.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/08317edc2d4200e3716deaf585925069601c8965

Modified Files
--------------
src/bin/pg_basebackup/receivelog.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Re: pgsql: pg_basebackup streaming: adjust version check msg

От:
Heikki Linnakangas <hlinnakangas@vmware.com>
Дата:
On 05/06/2014 03:47 PM, Simon Riggs wrote:
> pg_basebackup streaming: adjust version check msg
>
> Commit d298b50a3b469c088bb40a4d36d38111b4cd574d by Heikki Linnakangas
> requested that the version check message be updated at next release, suggesting
> that the appropriate text would be “9.3 or later”. The logic used for the check
> indicates that the correct text for 9.4 is “9.3 or 9.4”, since the logic would
> cause this to fail for later releases.

Thanks for picking this up. I looked at this a few weeks ago but 
couldn't come up with the right wording, and then forgot about it again.

> @@ -374,7 +374,7 @@ CheckServerVersionForStreaming(PGconn *conn)
>         fprintf(stderr, _("%s: incompatible server version %s; streaming is only supported with server version %s\n"),
>                 progname,
>                 serverver ? serverver : "'unknown'",
> -               "9.3");
> +               "9.3 or 9.4");
>         return false;
>     }
>     return true;

I'm afraid we can't do that because of translation. This would work for 
translations:

         fprintf(stderr, _("%s: incompatible server version %s; 
streaming is only supported with server version 9.3 or 9.4\n"),
                 progname,
                 serverver ? serverver : "'unknown'")

with the downside that it will need to be changed and re-translated, in 
every major release. The "9.3 or later" phrasing would avoid that, but 
you're right that it's not actually accurate.

Another idea is to say "is not supported with server versions older than 
9.3", when trying to connect to an older version, and "is not supported 
with server versions newer than 9.4", when connecting to >=9.5.

- Heikki

Re: pgsql: pg_basebackup streaming: adjust version check msg

От:
Simon Riggs <simon@2ndQuadrant.com>
Дата:
On 6 May 2014 14:01, Heikki Linnakangas  wrote:

> Another idea is to say "is not supported with server versions older than
> 9.3", when trying to connect to an older version, and "is not supported with
> server versions newer than 9.4", when connecting to >=9.5.

Will do

-- 
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Re: pgsql: pg_basebackup streaming: adjust version check msg

От:
Simon Riggs <simon@2ndQuadrant.com>
Дата:
Вложения:
On 6 May 2014 14:38, Simon Riggs  wrote:
> On 6 May 2014 14:01, Heikki Linnakangas  wrote:
>
>> Another idea is to say "is not supported with server versions older than
>> 9.3", when trying to connect to an older version, and "is not supported with
>> server versions newer than 9.4", when connecting to >=9.5.
>
> Will do

Attached patch will not need re-translation. Happy?

-- 
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Re: pgsql: pg_basebackup streaming: adjust version check msg

От:
Heikki Linnakangas <hlinnakangas@vmware.com>
Дата:
On 05/06/2014 04:52 PM, Simon Riggs wrote:
> On 6 May 2014 14:38, Simon Riggs  wrote:
>> On 6 May 2014 14:01, Heikki Linnakangas  wrote:
>>
>>> Another idea is to say "is not supported with server versions older than
>>> 9.3", when trying to connect to an older version, and "is not supported with
>>> server versions newer than 9.4", when connecting to >=9.5.
>>
>> Will do
>
> Attached patch will not need re-translation. Happy?

Hmm. Perhaps it would be better to say:

"streaming is not supported with server versions newer than the client 
(9.4)"

or something along those lines. The point being that you should use a 
newer version of the client, and it's not a fundamental limitation with 
the server version.

- Heikki

Re: pgsql: pg_basebackup streaming: adjust version check msg

От:
Simon Riggs <simon@2ndQuadrant.com>
Дата:
On 6 May 2014 15:00, Heikki Linnakangas  wrote:
> On 05/06/2014 04:52 PM, Simon Riggs wrote:
>>
>> On 6 May 2014 14:38, Simon Riggs  wrote:
>>>
>>> On 6 May 2014 14:01, Heikki Linnakangas  wrote:
>>>
>>>> Another idea is to say "is not supported with server versions older than
>>>> 9.3", when trying to connect to an older version, and "is not supported
>>>> with
>>>> server versions newer than 9.4", when connecting to >=9.5.
>>>
>>>
>>> Will do
>>
>>
>> Attached patch will not need re-translation. Happy?
>
>
> Hmm. Perhaps it would be better to say:
>
> "streaming is not supported with server versions newer than the client
> (9.4)"
>
> or something along those lines. The point being that you should use a newer
> version of the client, and it's not a fundamental limitation with the server
> version.

"$progname(PG_VERSION) does not support streaming with server versions..."

-- 
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

FAQ