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>
This commit is contained in:
parent
6be725e701
commit
52eec1c53a
|
@ -2432,7 +2432,6 @@ lazy_vacuum_index(Relation indrel, IndexBulkDeleteResult **stats,
|
||||||
LVDeadTuples *dead_tuples, double reltuples, LVRelStats *vacrelstats)
|
LVDeadTuples *dead_tuples, double reltuples, LVRelStats *vacrelstats)
|
||||||
{
|
{
|
||||||
IndexVacuumInfo ivinfo;
|
IndexVacuumInfo ivinfo;
|
||||||
const char *msg;
|
|
||||||
PGRUsage ru0;
|
PGRUsage ru0;
|
||||||
LVSavedErrInfo saved_err_info;
|
LVSavedErrInfo saved_err_info;
|
||||||
|
|
||||||
|
@ -2462,13 +2461,8 @@ lazy_vacuum_index(Relation indrel, IndexBulkDeleteResult **stats,
|
||||||
*stats = index_bulk_delete(&ivinfo, *stats,
|
*stats = index_bulk_delete(&ivinfo, *stats,
|
||||||
lazy_tid_reaped, (void *) dead_tuples);
|
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,
|
ereport(elevel,
|
||||||
(errmsg(msg,
|
(errmsg("scanned index \"%s\" to remove %d row versions",
|
||||||
vacrelstats->indname,
|
vacrelstats->indname,
|
||||||
dead_tuples->num_tuples),
|
dead_tuples->num_tuples),
|
||||||
errdetail_internal("%s", pg_rusage_show(&ru0))));
|
errdetail_internal("%s", pg_rusage_show(&ru0))));
|
||||||
|
@ -2491,7 +2485,6 @@ lazy_cleanup_index(Relation indrel,
|
||||||
double reltuples, bool estimated_count, LVRelStats *vacrelstats)
|
double reltuples, bool estimated_count, LVRelStats *vacrelstats)
|
||||||
{
|
{
|
||||||
IndexVacuumInfo ivinfo;
|
IndexVacuumInfo ivinfo;
|
||||||
const char *msg;
|
|
||||||
PGRUsage ru0;
|
PGRUsage ru0;
|
||||||
LVSavedErrInfo saved_err_info;
|
LVSavedErrInfo saved_err_info;
|
||||||
|
|
||||||
|
@ -2522,13 +2515,8 @@ lazy_cleanup_index(Relation indrel,
|
||||||
|
|
||||||
if (*stats)
|
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,
|
ereport(elevel,
|
||||||
(errmsg(msg,
|
(errmsg("index \"%s\" now contains %.0f row versions in %u pages",
|
||||||
RelationGetRelationName(indrel),
|
RelationGetRelationName(indrel),
|
||||||
(*stats)->num_index_tuples,
|
(*stats)->num_index_tuples,
|
||||||
(*stats)->num_pages),
|
(*stats)->num_pages),
|
||||||
|
|
|
@ -3187,13 +3187,14 @@ ReindexRelationConcurrently(Oid relationOid, int options)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Don't allow reindex for an invalid index on TOAST table, as
|
* 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)) &&
|
if (IsToastNamespace(get_rel_namespace(relationOid)) &&
|
||||||
!get_index_isvalid(relationOid))
|
!get_index_isvalid(relationOid))
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
(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,
|
* Check if parent relation can be locked and if it exists,
|
||||||
|
|
|
@ -181,6 +181,7 @@ be_tls_init(bool isServerStart)
|
||||||
if (ssl_ver_min == -1)
|
if (ssl_ver_min == -1)
|
||||||
{
|
{
|
||||||
ereport(isServerStart ? FATAL : LOG,
|
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",
|
(errmsg("\"%s\" setting \"%s\" not supported by this build",
|
||||||
"ssl_min_protocol_version",
|
"ssl_min_protocol_version",
|
||||||
GetConfigOption("ssl_min_protocol_version",
|
GetConfigOption("ssl_min_protocol_version",
|
||||||
|
@ -203,6 +204,7 @@ be_tls_init(bool isServerStart)
|
||||||
if (ssl_ver_max == -1)
|
if (ssl_ver_max == -1)
|
||||||
{
|
{
|
||||||
ereport(isServerStart ? FATAL : LOG,
|
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",
|
(errmsg("\"%s\" setting \"%s\" not supported by this build",
|
||||||
"ssl_max_protocol_version",
|
"ssl_max_protocol_version",
|
||||||
GetConfigOption("ssl_max_protocol_version",
|
GetConfigOption("ssl_max_protocol_version",
|
||||||
|
|
Loading…
Reference in New Issue