Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 52eec1c

Browse filesBrowse 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 6be725e commit 52eec1c
Copy full SHA for 52eec1c

File tree

Expand file treeCollapse file tree

3 files changed

+7
-16
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+7
-16
lines changed

‎src/backend/access/heap/vacuumlazy.c

Copy file name to clipboardExpand all lines: src/backend/access/heap/vacuumlazy.c
+2-14Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2432,7 +2432,6 @@ lazy_vacuum_index(Relation indrel, IndexBulkDeleteResult **stats,
24322432
LVDeadTuples *dead_tuples, double reltuples, LVRelStats *vacrelstats)
24332433
{
24342434
IndexVacuumInfo ivinfo;
2435-
const char *msg;
24362435
PGRUsage ru0;
24372436
LVSavedErrInfo saved_err_info;
24382437

@@ -2462,13 +2461,8 @@ lazy_vacuum_index(Relation indrel, IndexBulkDeleteResult **stats,
24622461
*stats = index_bulk_delete(&ivinfo, *stats,
24632462
lazy_tid_reaped, (void *) dead_tuples);
24642463

2465-
if (IsParallelWorker())
2466-
msg = gettext_noop("scanned index \"%s\" to remove %d row versions by parallel vacuum worker");
2467-
else
2468-
msg = gettext_noop("scanned index \"%s\" to remove %d row versions");
2469-
24702464
ereport(elevel,
2471-
(errmsg(msg,
2465+
(errmsg("scanned index \"%s\" to remove %d row versions",
24722466
vacrelstats->indname,
24732467
dead_tuples->num_tuples),
24742468
errdetail_internal("%s", pg_rusage_show(&ru0))));
@@ -2491,7 +2485,6 @@ lazy_cleanup_index(Relation indrel,
24912485
double reltuples, bool estimated_count, LVRelStats *vacrelstats)
24922486
{
24932487
IndexVacuumInfo ivinfo;
2494-
const char *msg;
24952488
PGRUsage ru0;
24962489
LVSavedErrInfo saved_err_info;
24972490

@@ -2522,13 +2515,8 @@ lazy_cleanup_index(Relation indrel,
25222515

25232516
if (*stats)
25242517
{
2525-
if (IsParallelWorker())
2526-
msg = gettext_noop("index \"%s\" now contains %.0f row versions in %u pages as reported by parallel vacuum worker");
2527-
else
2528-
msg = gettext_noop("index \"%s\" now contains %.0f row versions in %u pages");
2529-
25302518
ereport(elevel,
2531-
(errmsg(msg,
2519+
(errmsg("index \"%s\" now contains %.0f row versions in %u pages",
25322520
RelationGetRelationName(indrel),
25332521
(*stats)->num_index_tuples,
25342522
(*stats)->num_pages),

‎src/backend/commands/indexcmds.c

Copy file name to clipboardExpand all lines: src/backend/commands/indexcmds.c
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3187,13 +3187,14 @@ ReindexRelationConcurrently(Oid relationOid, int options)
31873187

31883188
/*
31893189
* Don't allow reindex for an invalid index on TOAST table, as
3190-
* if rebuilt it would not be possible to drop it.
3190+
* if rebuilt it would not be possible to drop it. Match
3191+
* error message in reindex_index().
31913192
*/
31923193
if (IsToastNamespace(get_rel_namespace(relationOid)) &&
31933194
!get_index_isvalid(relationOid))
31943195
ereport(ERROR,
31953196
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
3196-
errmsg("cannot reindex invalid index on TOAST table concurrently")));
3197+
errmsg("cannot reindex invalid index on TOAST table")));
31973198

31983199
/*
31993200
* Check if parent relation can be locked and if it exists,

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

Copy file name to clipboardExpand all lines: src/backend/libpq/be-secure-openssl.c
+2Lines changed: 2 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.