pg.ddx.io pgsql-translators@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Subject: [PATCH 4/6] Fix translation for pg_rusage_show()
Date: Sun, 21 May 2017 13:44:20 -0400
---
src/backend/catalog/index.c | 2 +-
src/backend/commands/vacuumlazy.c | 10 ++++------
src/backend/utils/misc/pg_rusage.c | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
inline patch 1: src/backend/catalog/index.c, src/backend/commands/vacuumlazy.c, src/backend/utils/misc/pg_rusage.c (+6/-8 lines) download inline-1.patch diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index b0b43cf02d..6aae1ab6fd 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -3453,7 +3453,7 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence,
ereport(INFO,
(errmsg("index \"%s\" was reindexed",
get_rel_name(indexId)),
- errdetail("%s.",
+ errdetail_internal("%s",
pg_rusage_show(&ru0))));
/* Close rels, but keep locks */
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index e1e39dfb4e..0506a9340c 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -1342,8 +1342,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
"%u pages are entirely empty.\n",
empty_pages),
empty_pages);
- appendStringInfo(&buf, _("%s."),
- pg_rusage_show(&ru0));
+ appendStringInfo(&buf, "%s.", pg_rusage_show(&ru0));
ereport(elevel,
(errmsg("\"%s\": found %.0f removable, %.0f nonremovable row versions in %u out of %u pages",
@@ -1418,8 +1417,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
(errmsg("\"%s\": removed %d row versions in %d pages",
RelationGetRelationName(onerel),
tupindex, npages),
- errdetail("%s.",
- pg_rusage_show(&ru0))));
+ errdetail_internal("%s", pg_rusage_show(&ru0))));
}
/*
@@ -1607,7 +1605,7 @@ lazy_vacuum_index(Relation indrel,
(errmsg("scanned index \"%s\" to remove %d row versions",
RelationGetRelationName(indrel),
vacrelstats->num_dead_tuples),
- errdetail("%s.", pg_rusage_show(&ru0))));
+ errdetail_internal("%s", pg_rusage_show(&ru0))));
}
/*
@@ -1817,7 +1815,7 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats)
(errmsg("\"%s\": truncated %u to %u pages",
RelationGetRelationName(onerel),
old_rel_pages, new_rel_pages),
- errdetail("%s.",
+ errdetail_internal("%s",
pg_rusage_show(&ru0))));
old_rel_pages = new_rel_pages;
} while (new_rel_pages > vacrelstats->nonempty_pages &&
diff --git a/src/backend/utils/misc/pg_rusage.c b/src/backend/utils/misc/pg_rusage.c
index 8781a383c0..fa248ab081 100644
--- a/src/backend/utils/misc/pg_rusage.c
+++ b/src/backend/utils/misc/pg_rusage.c
@@ -61,7 +61,7 @@ pg_rusage_show(const PGRUsage *ru0)
}
snprintf(result, sizeof(result),
- "CPU %d.%02ds/%d.%02du sec elapsed %d.%02d sec",
+ _("CPU %d.%02ds/%d.%02du sec elapsed %d.%02d sec"),
(int) (ru1.ru.ru_stime.tv_sec - ru0->ru.ru_stime.tv_sec),
(int) (ru1.ru.ru_stime.tv_usec - ru0->ru.ru_stime.tv_usec) / 10000,
(int) (ru1.ru.ru_utime.tv_sec - ru0->ru.ru_utime.tv_sec),
--
2.11.0
--xjlgdp2jdzqs2cgj
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment;
filename="0005-Make-new-message-identical-to-existing-ones.patch"
Message-ID: <no-message-id-537@localhost>
Permalink: ../no-message-id-537@localhost/
Also on: postgresql.org/message-id/no-message-id-537@localhost
copy link · copy postgr.es · copy git am
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-translators@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: [PATCH 4/6] Fix translation for pg_rusage_show()
In-Reply-To: <no-message-id-537@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox