Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file

2020-03-19 Thread Dagfinn Ilmari Mannsåker
Bruce Momjian writes: > On Wed, Feb 26, 2020 at 06:32:00PM +, Dagfinn Ilmari Mannsåker wrote: >> Tom Lane writes: >> >> > Michael Paquier writes: >> >> On Wed, Feb 26, 2020 at 10:06:38AM +0100, Magnus Hagander wrote: >> >>> +1, seems like that would be a regression in value. >> > >> >> Hav

Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file

2020-03-19 Thread Bruce Momjian
On Wed, Feb 26, 2020 at 06:32:00PM +, Dagfinn Ilmari Mannsåker wrote: > Tom Lane writes: > > > Michael Paquier writes: > >> On Wed, Feb 26, 2020 at 10:06:38AM +0100, Magnus Hagander wrote: > >>> +1, seems like that would be a regression in value. > > > >> Having more generic messages is less

Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file

2020-02-26 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > Michael Paquier writes: >> On Wed, Feb 26, 2020 at 10:06:38AM +0100, Magnus Hagander wrote: >>> +1, seems like that would be a regression in value. > >> Having more generic messages is less work for translators, we have >> PG_VERSION in the file name, and that's more complicat

Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file

2020-02-26 Thread Tom Lane
Michael Paquier writes: > On Wed, Feb 26, 2020 at 10:06:38AM +0100, Magnus Hagander wrote: >> +1, seems like that would be a regression in value. > Having more generic messages is less work for translators, we have > PG_VERSION in the file name, and that's more complicated to translate > in both

Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file

2020-02-26 Thread Michael Paquier
On Wed, Feb 26, 2020 at 10:06:38AM +0100, Magnus Hagander wrote: > +1, seems like that would be a regression in value. Having more generic messages is less work for translators, we have PG_VERSION in the file name, and that's more complicated to translate in both French and Japanese. No idea abou

Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file

2020-02-26 Thread Magnus Hagander
On Wed, Feb 26, 2020 at 9:56 AM Daniel Gustafsson wrote: > > > On 26 Feb 2020, at 02:48, Michael Paquier wrote: > > > > On Tue, Feb 25, 2020 at 11:55:06PM +, Dagfinn Ilmari Mannsåker wrote: > >> @@ -164,11 +164,11 @@ get_major_server_version(ClusterInfo *cluster) > >> snprintf(ver_filena

Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file

2020-02-26 Thread Daniel Gustafsson
> On 26 Feb 2020, at 02:48, Michael Paquier wrote: > > On Tue, Feb 25, 2020 at 11:55:06PM +, Dagfinn Ilmari Mannsåker wrote: >> @@ -164,11 +164,11 @@ get_major_server_version(ClusterInfo *cluster) >> snprintf(ver_filename, sizeof(ver_filename), "%s/PG_VERSION", >> c

Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file

2020-02-25 Thread Michael Paquier
On Tue, Feb 25, 2020 at 11:55:06PM +, Dagfinn Ilmari Mannsåker wrote: > @@ -164,11 +164,11 @@ get_major_server_version(ClusterInfo *cluster) > snprintf(ver_filename, sizeof(ver_filename), "%s/PG_VERSION", >cluster->pgdata); > if ((version_fd = fopen(ver_filen

Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file

2020-02-25 Thread Dagfinn Ilmari Mannsåker
Daniel Gustafsson writes: > A few lines further down from this we report an error in case we are unable to > parse the file in question: > > pg_fatal("could not parse PG_VERSION file from %s\n", > cluster->pgdata); > > Should the pgdata argument be quoted there as well, like \"%s\", to m

Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file

2020-02-25 Thread Daniel Gustafsson
> On 26 Feb 2020, at 00:14, Dagfinn Ilmari Mannsåker wrote: > It would have saved some minutes of debugging time if that had included > the reason why the open failed, so here's a patch to do so. +1 on the attached patch. A quick skim across the similar error reportings in pg_upgrade doesn't tu

[PATCH] pg_upgrade: report the reason for failing to open the cluster version file

2020-02-25 Thread Dagfinn Ilmari Mannsåker
Hi Hackers, The other day I was helping someone with pg_upgrade on IRC, and they got a rather unhelpful error message: ERROR: could not open version file /path/to/new/cluster/PG_VERSION It would have saved some minutes of debugging time if that had included the reason why the open failed, so h