summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/ref/explain.sgml3
-rw-r--r--src/backend/commands/explain.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/explain.sgml b/doc/src/sgml/ref/explain.sgml
index 6dda680aa0d..7dee77fd366 100644
--- a/doc/src/sgml/ref/explain.sgml
+++ b/doc/src/sgml/ref/explain.sgml
@@ -241,7 +241,8 @@ ROLLBACK;
<para>
Include information on WAL record generation. Specifically, include the
number of records, number of full page images (fpi), the amount of WAL
- generated in bytes and the number of times the WAL buffers became full.
+ generated in bytes, the amount of full page images generated in bytes,
+ and the number of times the WAL buffers became full.
In text format, only non-zero values are printed.
This parameter may only be used when <literal>ANALYZE</literal> is also
enabled. It defaults to <literal>FALSE</literal>.
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index e6edae0845c..7e699f8595e 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -4283,7 +4283,8 @@ show_wal_usage(ExplainState *es, const WalUsage *usage)
{
/* Show only positive counter values. */
if ((usage->wal_records > 0) || (usage->wal_fpi > 0) ||
- (usage->wal_bytes > 0) || (usage->wal_buffers_full > 0))
+ (usage->wal_bytes > 0) || (usage->wal_buffers_full > 0) ||
+ (usage->wal_fpi_bytes > 0))
{
ExplainIndentText(es);
appendStringInfoString(es->str, "WAL:");
@@ -4297,6 +4298,9 @@ show_wal_usage(ExplainState *es, const WalUsage *usage)
if (usage->wal_bytes > 0)
appendStringInfo(es->str, " bytes=%" PRIu64,
usage->wal_bytes);
+ if (usage->wal_fpi_bytes > 0)
+ appendStringInfo(es->str, " fpi bytes=%" PRIu64,
+ usage->wal_fpi_bytes);
if (usage->wal_buffers_full > 0)
appendStringInfo(es->str, " buffers full=%" PRId64,
usage->wal_buffers_full);
@@ -4311,6 +4315,8 @@ show_wal_usage(ExplainState *es, const WalUsage *usage)
usage->wal_fpi, es);
ExplainPropertyUInteger("WAL Bytes", NULL,
usage->wal_bytes, es);
+ ExplainPropertyUInteger("WAL FPI Bytes", NULL,
+ usage->wal_fpi_bytes, es);
ExplainPropertyInteger("WAL Buffers Full", NULL,
usage->wal_buffers_full, es);
}