Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j71Ti-0007hh-KU for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Feb 2020 18:32:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j71Tg-00052F-Tf for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Feb 2020 18:32:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j71Te-00051M-VD for pgsql-hackers@lists.postgresql.org; Wed, 26 Feb 2020 18:32:12 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j71Ta-0002bL-Ka for pgsql-hackers@lists.postgresql.org; Wed, 26 Feb 2020 18:32:10 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BC3D121FB6; Wed, 26 Feb 2020 13:32:03 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 26 Feb 2020 13:32:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; h= from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=fm1; bh=bt/tmH0DlnoI0vLZGyTcLZRkRi Ee315AQMtvj/Ptoes=; b=VR6O6A2HU3oJArVgpUPNnSa0hNHtJNhErga908qLWV kC04rqsI1Ot3aXE4Ineo5Sjn+G+mDF2d3j8OdhTFF2xaZWQ7mpbzZsNTf8mnQEaF by4AY68zXxi1pD2paYo4LPWalfKTt0P1lAedFi7aRFZbp065onempktI+NoMyrmJ YD4TTbWHUoudyCtSrN3dtiqCnvcBjwNq04MCAoB1CDH5VQ+ctUiEAPZKgWH1MxyC 5eIlybX1Rj+dOg7ZbkvFverrArzDJ+T32rY0wKtQ9kVYNFzl4dJ4OjF+rdFsTtrc VxnfZ2BeVGv5JTU1DwtjSuOQAOLBDKcuOXlGgLJNTT3w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=bt/tmH 0DlnoI0vLZGyTcLZRkRiEe315AQMtvj/Ptoes=; b=zDkSr3NygysG9BW8zJeEMF h9E8KcfG5K2Zg1mVJwir863/eVrsr8LPNlNGvskQWkdPSmZBWwW256gy9KAof2uM k7su78k4AIVRo4GHKwFP4dzgvmh9s7SnIk0pGFGy3xSfOpX/LjTFH9ZD1BZTP/W8 Db2fWQlC3oCK2pmvfnikiLd9J/rnihEygPheDtJSIkTv9m/4NA9uJx1nsnZQuBHE 6ErxXIoYFGDKtnxADU7R2BS8OHHGIS1ckw1VSjJZ7zx1YZviqO+FSTba491vmDME eOC9wqZOC3JXK7fG1FyZvVPblpPglw7LhZZ7m4mPA1MvE9rPKOkDaSgnIgKkgveg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrleeggdduudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlvdefmdenucfjughrpefhvffufhffjgfkfgggtgesmhdtreertder jeenucfhrhhomhepihhlmhgrrhhisehilhhmrghrihdrohhrghculdffrghgfhhinhhnuc fklhhmrghrihcuofgrnhhnshonkhgvrhdmnecukfhppeegiedrgeefrdduhedrvdehvden ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehilhhmrg hrihesihhlmhgrrhhirdhorhhg X-ME-Proxy: Received: from wibble.ilmari.org (wibble.ilmari.org [46.43.15.252]) by mail.messagingengine.com (Postfix) with ESMTPA id 42BC2328005D; Wed, 26 Feb 2020 13:32:02 -0500 (EST) From: ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) To: Tom Lane Cc: Michael Paquier , Magnus Hagander , Daniel Gustafsson , PostgreSQL Developers Subject: Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file References: <87pne2w98h.fsf@wibble.ilmari.org> <44115C15-EE49-4BDE-A976-2901384B5E60@yesql.se> <87mu96w7c5.fsf@wibble.ilmari.org> <20200226014844.GF17153@paquier.xyz> <2760811A-9AF4-4725-8A8A-061940CCF962@yesql.se> <20200226093551.GA106669@paquier.xyz> <9878.1582732525@sss.pgh.pa.us> Date: Wed, 26 Feb 2020 18:32:00 +0000 In-Reply-To: <9878.1582732525@sss.pgh.pa.us> (Tom Lane's message of "Wed, 26 Feb 2020 10:55:25 -0500") Message-ID: <87k149w673.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-=-= Content-Type: text/plain 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 complicated to translate >> in both French and Japanese. No idea about other languages. > > Just looking at the committed diff, it seems painfully obvious that these > two messages were written by different people who weren't talking to each > other. Why aren't they more alike? Given > > pg_fatal("could not open version file \"%s\": %m\n", ver_filename); > > (which seems fine to me), I think the second ought to be > > pg_fatal("could not parse version file \"%s\"\n", ver_filename); Good point. Patch attached. - ilmari -- - Twitter seems more influential [than blogs] in the 'gets reported in the mainstream press' sense at least. - Matt McLeod - That'd be because the content of a tweet is easier to condense down to a mainstream media article. - Calle Dybedahl --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Make-pg_upgrade-s-version-file-parsing-error-message.patch From a761148357420fdf81589e28df701cc1fde4cb87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= Date: Wed, 26 Feb 2020 18:29:03 +0000 Subject: [PATCH] Make pg_upgrade's version file parsing error message consistent --- src/bin/pg_upgrade/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/pg_upgrade/server.c b/src/bin/pg_upgrade/server.c index be604d3351..f669bb4e8a 100644 --- a/src/bin/pg_upgrade/server.c +++ b/src/bin/pg_upgrade/server.c @@ -168,7 +168,7 @@ get_major_server_version(ClusterInfo *cluster) if (fscanf(version_fd, "%63s", cluster->major_version_str) == 0 || sscanf(cluster->major_version_str, "%d.%d", &v1, &v2) < 1) - pg_fatal("could not parse PG_VERSION file from \"%s\"\n", cluster->pgdata); + pg_fatal("could not parse version file \"%s\"\n", ver_filename); fclose(version_fd); -- 2.20.1 --=-=-=--