Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbFEj-0005uq-4I for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Nov 2020 03:49:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kbFEi-0001uk-29 for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Nov 2020 03:49:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbFEh-0001ud-6d for pgsql-hackers@lists.postgresql.org; Sat, 07 Nov 2020 03:49:55 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbFEd-00089K-Bn for pgsql-hackers@lists.postgresql.org; Sat, 07 Nov 2020 03:49:54 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 4F5B4B11; Fri, 6 Nov 2020 22:49:47 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 06 Nov 2020 22:49:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=jYzDge Olqipt++1fz6KWvVtFzk9ivRK1lWsCSonYf2Y=; b=PClLtIqWtYirLDrbw6ZluY Lgj2GBJtQje7hjzfTgQwoKY3mYxpcPUczq0DcGR3WqrJc4jr6owMHbLm7fVIl9Cz AsBW0aVU/ITelh08mUaN6eGsYJINh+9fkRx4uuEUQpSBBPPoUBCzXTDOrkgYzcUC emhfyLJ6oreot7CqXYiJZzfimekepZUKUb60aQlZZXKyEh17nABMCkAzgOAjNh/x rSS0BQMo/qvaj9TasF6kK88TjcyFKZLUpu05pNqK3sSm+em+aJ5Cxe3V7QOT0khV 5X/lODI/UaNlxs2r2voxhF+KduDKfFZ0YjNeL+fgwHsCfLstTjDdUhcBMuewJQFQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddutddgiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgfsehmkeerredtredunecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpeejhfetgfevvddvlefgteehfeeitdegieegkeelgfejvddv vdfgheejkeefgfefveenucfkphepudeltddrleehrdduledrudegkeenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghl vhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.148]) by mail.messagingengine.com (Postfix) with ESMTPA id 6584B328041D; Fri, 6 Nov 2020 22:49:46 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 69C9F2A154D; Sat, 7 Nov 2020 00:49:43 -0300 (-03) Date: Sat, 7 Nov 2020 00:49:43 -0300 From: Alvaro Herrera To: Pg Hackers Cc: Amit Kapila , Michael Paquier Subject: PG13: message style changes Message-ID: <20201107034943.GA16596@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="5vNYLRcllDrimb99" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --5vNYLRcllDrimb99 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit I propose to apply the following changes to messages in pg13. In 0001, I propose changing messages that were introduced as different for parallel vacuum workers. Frankly I don't understand why we are bragging about the vacuum being done in a parallel worker; does the user care? It seems to me that users are just satisfied to know that the indexes were scanned; the fact that this was done in a parallel worker is not of much interest, so why call attention to that? Therefore, we can reduce the message to what's emitted in the normal case. In 0002, I propose to remove the word "concurrently" in an error message when an invalid index cannot be reindexed. In fact, the problem is generic: we just cannot reindex the index at all, regardless of concurrently or not. So we can reduce this message to be identical to the one we throw in the non-concurrent case. (Dropped 0003 while composing this email.) Patch 0004 just adds a comment to clarify a message that I found confusing when doing the translation. -- Álvaro Herrera 39°49'30"S 73°17'W --5vNYLRcllDrimb99 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Simplify-message.patch" From 3ea8f3ebd421e3c9b5633fffb7f38d999f21895f Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Tue, 22 Sep 2020 13:04:25 -0300 Subject: [PATCH 1/4] Simplify message The user doesn't really care that a particular index vacuum was executed by a parallel worker or not; remove that bit from the progress message. --- src/backend/access/heap/vacuumlazy.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index 2174fccb1e..25f2d5df1b 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -2432,7 +2432,6 @@ lazy_vacuum_index(Relation indrel, IndexBulkDeleteResult **stats, LVDeadTuples *dead_tuples, double reltuples, LVRelStats *vacrelstats) { IndexVacuumInfo ivinfo; - const char *msg; PGRUsage ru0; LVSavedErrInfo saved_err_info; @@ -2462,13 +2461,8 @@ lazy_vacuum_index(Relation indrel, IndexBulkDeleteResult **stats, *stats = index_bulk_delete(&ivinfo, *stats, lazy_tid_reaped, (void *) dead_tuples); - if (IsParallelWorker()) - msg = gettext_noop("scanned index \"%s\" to remove %d row versions by parallel vacuum worker"); - else - msg = gettext_noop("scanned index \"%s\" to remove %d row versions"); - ereport(elevel, - (errmsg(msg, + (errmsg("scanned index \"%s\" to remove %d row versions", vacrelstats->indname, dead_tuples->num_tuples), errdetail_internal("%s", pg_rusage_show(&ru0)))); @@ -2491,7 +2485,6 @@ lazy_cleanup_index(Relation indrel, double reltuples, bool estimated_count, LVRelStats *vacrelstats) { IndexVacuumInfo ivinfo; - const char *msg; PGRUsage ru0; LVSavedErrInfo saved_err_info; @@ -2522,13 +2515,8 @@ lazy_cleanup_index(Relation indrel, if (*stats) { - if (IsParallelWorker()) - msg = gettext_noop("index \"%s\" now contains %.0f row versions in %u pages as reported by parallel vacuum worker"); - else - msg = gettext_noop("index \"%s\" now contains %.0f row versions in %u pages"); - ereport(elevel, - (errmsg(msg, + (errmsg("index \"%s\" now contains %.0f row versions in %u pages", RelationGetRelationName(indrel), (*stats)->num_index_tuples, (*stats)->num_pages), -- 2.20.1 --5vNYLRcllDrimb99 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0002-Remove-concurrently-from-error-message.patch" From 0c86613625a66ca81ed3f57f28f63567f5e690fc Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Tue, 22 Sep 2020 13:07:11 -0300 Subject: [PATCH 2/4] Remove "concurrently" from error message Invalid indexes on toast tables cannot be reindexed regardless of mode of operation. --- src/backend/commands/indexcmds.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 75552c64ed..3522f4b6a6 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -3187,13 +3187,14 @@ ReindexRelationConcurrently(Oid relationOid, int options) /* * Don't allow reindex for an invalid index on TOAST table, as - * if rebuilt it would not be possible to drop it. + * if rebuilt it would not be possible to drop it. Match + * error message in reindex_index(). */ if (IsToastNamespace(get_rel_namespace(relationOid)) && !get_index_isvalid(relationOid)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot reindex invalid index on TOAST table concurrently"))); + errmsg("cannot reindex invalid index on TOAST table"))); /* * Check if parent relation can be locked and if it exists, -- 2.20.1 --5vNYLRcllDrimb99 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0004-Make-message-less-obscure.patch" From e78fd46092807bbef23c8941aa4f43fc78a1f7f4 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Tue, 22 Sep 2020 13:09:07 -0300 Subject: [PATCH 4/4] Make message less obscure This message is pretty misterious, so add a 'translator:' comment to explain --- src/backend/libpq/be-secure-openssl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c index 9231a1470c..f9d68b12c8 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure-openssl.c @@ -181,6 +181,7 @@ be_tls_init(bool isServerStart) if (ssl_ver_min == -1) { ereport(isServerStart ? FATAL : LOG, + /*- translator: first %s is a GUC option name, second %s is its value */ (errmsg("\"%s\" setting \"%s\" not supported by this build", "ssl_min_protocol_version", GetConfigOption("ssl_min_protocol_version", @@ -203,6 +204,7 @@ be_tls_init(bool isServerStart) if (ssl_ver_max == -1) { ereport(isServerStart ? FATAL : LOG, + /*- translator: first %s is a GUC option name, second %s is its value */ (errmsg("\"%s\" setting \"%s\" not supported by this build", "ssl_max_protocol_version", GetConfigOption("ssl_max_protocol_version", -- 2.20.1 --5vNYLRcllDrimb99--