aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2020-07-09 10:06:24 +1200
committerDavid Rowley <drowley@postgresql.org>2020-07-09 10:06:24 +1200
commit2b7dbc0db6ecf38fc305284d006a1ef8f5354fbb (patch)
treeb527d2cc2813040f011ed37f45bfdf0a7b88ecd6
parenta9a4a7ad565b136cbee735d4bb505d98d06da522 (diff)
downloadpostgresql-2b7dbc0db6ecf38fc305284d006a1ef8f5354fbb.tar.gz
postgresql-2b7dbc0db6ecf38fc305284d006a1ef8f5354fbb.zip
Fix whitespace in HashAgg EXPLAIN ANALYZE
The Sort node does not put a space between the number of kilobytes and the "kB" of memory or disk space used, but HashAgg does. Here we align HashAgg to do the same as Sort. Sort has been displaying this information for longer than HashAgg, so it makes sense to align HashAgg to Sort rather than the other way around. Reported-by: Justin Pryzby Discussion: https://postgr.es/m/20200708163021.GW4107@telsasoft.com Backpatch-through: 13, where the hashagg started showing these details
-rw-r--r--src/backend/commands/explain.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 093864cfc04..a283e4d45c8 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -3099,11 +3099,11 @@ show_hashagg_info(AggState *aggstate, ExplainState *es)
else
appendStringInfoString(es->str, " ");
- appendStringInfo(es->str, "Peak Memory Usage: " INT64_FORMAT " kB",
+ appendStringInfo(es->str, "Peak Memory Usage: " INT64_FORMAT "kB",
memPeakKb);
if (aggstate->hash_batches_used > 0)
- appendStringInfo(es->str, " Disk Usage: " UINT64_FORMAT " kB HashAgg Batches: %d",
+ appendStringInfo(es->str, " Disk Usage: " UINT64_FORMAT "kB HashAgg Batches: %d",
aggstate->hash_disk_used,
aggstate->hash_batches_used);
appendStringInfoChar(es->str, '\n');
@@ -3130,11 +3130,11 @@ show_hashagg_info(AggState *aggstate, ExplainState *es)
{
ExplainIndentText(es);
- appendStringInfo(es->str, "Peak Memory Usage: " INT64_FORMAT " kB",
+ appendStringInfo(es->str, "Peak Memory Usage: " INT64_FORMAT "kB",
memPeakKb);
if (hash_batches_used > 0)
- appendStringInfo(es->str, " Disk Usage: " UINT64_FORMAT " kB HashAgg Batches: %d",
+ appendStringInfo(es->str, " Disk Usage: " UINT64_FORMAT "kB HashAgg Batches: %d",
hash_disk_used, hash_batches_used);
appendStringInfoChar(es->str, '\n');
}