Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qLnBe-000hPB-7F for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Jul 2023 16:04:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qLnBc-00AoWy-H8 for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Jul 2023 16:04:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qLnBc-00AoWq-7f for pgsql-hackers@lists.postgresql.org; Tue, 18 Jul 2023 16:04:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qLnBV-0009rB-MY for pgsql-hackers@lists.postgresql.org; Tue, 18 Jul 2023 16:04:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 36IG4KoW057272; Tue, 18 Jul 2023 12:04:20 -0400 From: Tom Lane To: Daniel Gustafsson cc: PostgreSQL Hackers Subject: Re: Giving more detail in pg_upgrade errormessage In-reply-to: References: Comments: In-reply-to Daniel Gustafsson message dated "Tue, 18 Jul 2023 16:59:32 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <57270.1689696260.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 18 Jul 2023 12:04:20 -0400 Message-ID: <57271.1689696260@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Daniel Gustafsson writes: > Looking at the upgrade question in [0] made me realize that we discard > potentially useful information for troubleshooting. When we check if th= e > cluster is properly shut down we might as well include the status from > pg_controldata in the errormessage as per the trivial (but yet untested) > proposed diff. > Is there a reason not to be verbose here as users might copy/paste this = output > when asking for help? Agreed, but I think you need to chomp the string's trailing newline, or it'll look ugly. You might as well do that further up and remove the newlines from the comparison strings, too. regards, tom lane