v1-fix_explain_wal_output.diff
text/x-patch
Filename: v1-fix_explain_wal_output.diff
Type: text/x-patch
Part: 0
Message:
Re: WAL usage calculation patch
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
Series: patch v1
| File | + | − |
|---|---|---|
| src/backend/commands/explain.c | 4 | 4 |
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 7ae6131676..9cc1b13b76 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -3350,13 +3350,13 @@ show_wal_usage(ExplainState *es, const WalUsage *usage)
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",
+ appendStringInfo(es->str, " fpw=%ld",
usage->wal_fpw);
if (usage->wal_bytes > 0)
- appendStringInfo(es->str, " bytes=" UINT64_FORMAT,
+ appendStringInfo(es->str, " bytes=" UINT64_FORMAT,
usage->wal_bytes);
appendStringInfoChar(es->str, '\n');
}
@@ -3365,7 +3365,7 @@ show_wal_usage(ExplainState *es, const WalUsage *usage)
{
ExplainPropertyInteger("WAL records", NULL,
usage->wal_records, es);
- ExplainPropertyInteger("WAL full page writes", NULL,
+ ExplainPropertyInteger("WAL fpw", NULL,
usage->wal_fpw, es);
ExplainPropertyUInteger("WAL bytes", NULL,
usage->wal_bytes, es);