Re: pgsql: pg_basebackup streaming: adjust version check msg

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: pg_basebackup streaming: adjust version check msg
Date: 2014-05-06 13:01:35
Message-ID: 5368DD2F.70208@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2014-05-06 13:08:20 pgsql: Update typedef list in preparation for pgindent run
Previous Message Bruce Momjian 2014-05-06 12:52:58 pgsql: More rewording of pg_stat_statements for 9.4 release notes