Skip to content

Commit ad25744

Browse files
committed
Add wal_fpi_bytes to VACUUM and ANALYZE logs
The new wal_fpi_bytes counter calculates the total amount of full page images inserted in WAL records, in bytes. This commit adds this information to VACUUM and ANALYZE logs alongside the existing counters, building upon f9a09aa. Author: Shinya Kato <[email protected]> Reviewed-by: Michael Paquier <[email protected]> Discussion: https://postgr.es/m/[email protected]
1 parent fce7c73 commit ad25744

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/backend/access/heap/vacuumlazy.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,10 +1148,11 @@ heap_vacuum_rel(Relation rel, const VacuumParams params,
11481148
total_blks_read,
11491149
total_blks_dirtied);
11501150
appendStringInfo(&buf,
1151-
_("WAL usage: %" PRId64 " records, %" PRId64 " full page images, %" PRIu64 " bytes, %" PRId64 " buffers full\n"),
1151+
_("WAL usage: %" PRId64 " records, %" PRId64 " full page images, %" PRIu64 " bytes, %" PRIu64 " full page image bytes, %" PRId64 " buffers full\n"),
11521152
walusage.wal_records,
11531153
walusage.wal_fpi,
11541154
walusage.wal_bytes,
1155+
walusage.wal_fpi_bytes,
11551156
walusage.wal_buffers_full);
11561157
appendStringInfo(&buf, _("system usage: %s"), pg_rusage_show(&ru0));
11571158

src/backend/commands/analyze.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,10 +831,11 @@ do_analyze_rel(Relation onerel, const VacuumParams params,
831831
total_blks_read,
832832
total_blks_dirtied);
833833
appendStringInfo(&buf,
834-
_("WAL usage: %" PRId64 " records, %" PRId64 " full page images, %" PRIu64 " bytes, %" PRId64 " buffers full\n"),
834+
_("WAL usage: %" PRId64 " records, %" PRId64 " full page images, %" PRIu64 " bytes, %" PRIu64 " full page image bytes, %" PRId64 " buffers full\n"),
835835
walusage.wal_records,
836836
walusage.wal_fpi,
837837
walusage.wal_bytes,
838+
walusage.wal_fpi_bytes,
838839
walusage.wal_buffers_full);
839840
appendStringInfo(&buf, _("system usage: %s"), pg_rusage_show(&ru0));
840841

0 commit comments

Comments
 (0)