aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/explain.c
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2020-05-05 08:00:53 +0530
committerAmit Kapila <akapila@postgresql.org>2020-05-05 08:00:53 +0530
commit69bfaf2e1de49de76d7dec1c45511932a5ef502b (patch)
treee9ff414948222324edbb33f0f603ee4800e218bd /src/backend/commands/explain.c
parent5545b69ae65f27ba1f4ceaf24486e98c186e9412 (diff)
downloadpostgresql-69bfaf2e1de49de76d7dec1c45511932a5ef502b.tar.gz
postgresql-69bfaf2e1de49de76d7dec1c45511932a5ef502b.zip
Change the display of WAL usage statistics in Explain.
In commit 33e05f89c5, we have added the option to display WAL usage statistics in Explain and auto_explain. The display format used two spaces between each field which is inconsistent with Buffer usage statistics which is using one space between each field. Change the format to make WAL usage statistics consistent with Buffer usage statistics. This commit also changed the usage of "full page writes" to "full page images" for WAL usage statistics to make it consistent with other parts of code and docs. Author: Julien Rouhaud, Amit Kapila Reviewed-by: Justin Pryzby, Kyotaro Horiguchi and Amit Kapila Discussion: https://postgr.es/m/CAB-hujrP8ZfUkvL5OYETipQwA=e3n7oqHFU=4ZLxWS_Cza3kQQ@mail.gmail.com
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r--src/backend/commands/explain.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 7ae61316760..1275bec6732 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -3343,31 +3343,31 @@ show_wal_usage(ExplainState *es, const WalUsage *usage)
if (es->format == EXPLAIN_FORMAT_TEXT)
{
/* Show only positive counter values. */
- if ((usage->wal_records > 0) || (usage->wal_fpw > 0) ||
+ if ((usage->wal_records > 0) || (usage->wal_fpi > 0) ||
(usage->wal_bytes > 0))
{
ExplainIndentText(es);
appendStringInfoString(es->str, "WAL:");
if (usage->wal_records > 0)
- appendStringInfo(es->str, " records=%ld",
+ appendStringInfo(es->str, " records=%ld",
usage->wal_records);
- if (usage->wal_fpw > 0)
- appendStringInfo(es->str, " full page writes=%ld",
- usage->wal_fpw);
+ if (usage->wal_fpi > 0)
+ appendStringInfo(es->str, " fpi=%ld",
+ usage->wal_fpi);
if (usage->wal_bytes > 0)
- appendStringInfo(es->str, " bytes=" UINT64_FORMAT,
+ appendStringInfo(es->str, " bytes=" UINT64_FORMAT,
usage->wal_bytes);
appendStringInfoChar(es->str, '\n');
}
}
else
{
- ExplainPropertyInteger("WAL records", NULL,
+ ExplainPropertyInteger("WAL Records", NULL,
usage->wal_records, es);
- ExplainPropertyInteger("WAL full page writes", NULL,
- usage->wal_fpw, es);
- ExplainPropertyUInteger("WAL bytes", NULL,
+ ExplainPropertyInteger("WAL FPI", NULL,
+ usage->wal_fpi, es);
+ ExplainPropertyUInteger("WAL Bytes", NULL,
usage->wal_bytes, es);
}
}