From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file |
Date: | 2020-02-26 09:06:38 |
Message-ID: | CABUevEygyP_o9LmEWbSGzP3Wu-sstGSrQE9kq_WpuOEy1FOm5g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Feb 26, 2020 at 9:56 AM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
> > On 26 Feb 2020, at 02:48, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >
> > On Tue, Feb 25, 2020 at 11:55:06PM +0000, 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_filename, "r")) == NULL)
> >> - pg_fatal("could not open version file: %s\n", ver_filename);
> >> + pg_fatal("could not open version file \"%s\": %m\n", ver_filename);
> >
> > Here I think that it would be better to just use "could not open
> > file" as we know that we are dealing with a version file already
> > thanks to ver_filename.
>
> Isn't that a removal of detail with very little benefit? Not everyone running
> pg_upgrade will know internal filenames, and the ver_filename contains the
> pgdata path as well which might provide additional clues in case this goes
> wrong.
+1, seems like that would be a regression in value.
Committed as per Dagfinn's v2.
--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2020-02-26 09:35:51 | Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file |
Previous Message | Daniel Gustafsson | 2020-02-26 08:56:05 | Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file |