Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 99f9384

Browse files
committed
Message style improvements
* Avoid pointlessly highlighting that an index vacuum was executed by a parallel worker; user doesn't care. * Don't give the impression that a non-concurrent reindex of an invalid index on a TOAST table would work, because it wouldn't. * Add a "translator:" comment for a mysterious message. Discussion: https://postgr.es/m/20201107034943.GA16596@alvherre.pgsql Reviewed-by: Michael Paquier <michael@paquier.xyz>
1 parent f3ad4fd commit 99f9384

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

src/backend/access/heap/vacuumlazy.c

+2-14
Original file line numberDiff line numberDiff line change
@@ -2407,7 +2407,6 @@ lazy_vacuum_index(Relation indrel, IndexBulkDeleteResult **stats,
24072407
LVDeadTuples *dead_tuples, double reltuples, LVRelStats *vacrelstats)
24082408
{
24092409
IndexVacuumInfo ivinfo;
2410-
const char *msg;
24112410
PGRUsage ru0;
24122411
LVSavedErrInfo saved_err_info;
24132412

@@ -2437,13 +2436,8 @@ lazy_vacuum_index(Relation indrel, IndexBulkDeleteResult **stats,
24372436
*stats = index_bulk_delete(&ivinfo, *stats,
24382437
lazy_tid_reaped, (void *) dead_tuples);
24392438

2440-
if (IsParallelWorker())
2441-
msg = gettext_noop("scanned index \"%s\" to remove %d row versions by parallel vacuum worker");
2442-
else
2443-
msg = gettext_noop("scanned index \"%s\" to remove %d row versions");
2444-
24452439
ereport(elevel,
2446-
(errmsg(msg,
2440+
(errmsg("scanned index \"%s\" to remove %d row versions",
24472441
vacrelstats->indname,
24482442
dead_tuples->num_tuples),
24492443
errdetail_internal("%s", pg_rusage_show(&ru0))));
@@ -2466,7 +2460,6 @@ lazy_cleanup_index(Relation indrel,
24662460
double reltuples, bool estimated_count, LVRelStats *vacrelstats)
24672461
{
24682462
IndexVacuumInfo ivinfo;
2469-
const char *msg;
24702463
PGRUsage ru0;
24712464
LVSavedErrInfo saved_err_info;
24722465

@@ -2497,13 +2490,8 @@ lazy_cleanup_index(Relation indrel,
24972490

24982491
if (*stats)
24992492
{
2500-
if (IsParallelWorker())
2501-
msg = gettext_noop("index \"%s\" now contains %.0f row versions in %u pages as reported by parallel vacuum worker");
2502-
else
2503-
msg = gettext_noop("index \"%s\" now contains %.0f row versions in %u pages");
2504-
25052493
ereport(elevel,
2506-
(errmsg(msg,
2494+
(errmsg("index \"%s\" now contains %.0f row versions in %u pages",
25072495
RelationGetRelationName(indrel),
25082496
(*stats)->num_index_tuples,
25092497
(*stats)->num_pages),

src/backend/commands/indexcmds.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -2993,13 +2993,14 @@ ReindexRelationConcurrently(Oid relationOid, int options)
29932993

29942994
/*
29952995
* Don't allow reindex for an invalid index on TOAST table, as
2996-
* if rebuilt it would not be possible to drop it.
2996+
* if rebuilt it would not be possible to drop it. Match
2997+
* error message in reindex_index().
29972998
*/
29982999
if (IsToastNamespace(get_rel_namespace(relationOid)) &&
29993000
!get_index_isvalid(relationOid))
30003001
ereport(ERROR,
30013002
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
3002-
errmsg("cannot reindex invalid index on TOAST table concurrently")));
3003+
errmsg("cannot reindex invalid index on TOAST table")));
30033004

30043005
/* Save the list of relation OIDs in private context */
30053006
oldcontext = MemoryContextSwitchTo(private_context);

src/backend/libpq/be-secure-openssl.c

+2
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ be_tls_init(bool isServerStart)
181181
if (ssl_ver_min == -1)
182182
{
183183
ereport(isServerStart ? FATAL : LOG,
184+
/*- translator: first %s is a GUC option name, second %s is its value */
184185
(errmsg("\"%s\" setting \"%s\" not supported by this build",
185186
"ssl_min_protocol_version",
186187
GetConfigOption("ssl_min_protocol_version",
@@ -203,6 +204,7 @@ be_tls_init(bool isServerStart)
203204
if (ssl_ver_max == -1)
204205
{
205206
ereport(isServerStart ? FATAL : LOG,
207+
/*- translator: first %s is a GUC option name, second %s is its value */
206208
(errmsg("\"%s\" setting \"%s\" not supported by this build",
207209
"ssl_max_protocol_version",
208210
GetConfigOption("ssl_max_protocol_version",

0 commit comments

Comments
 (0)