diff options
author | Michael Paquier <michael@paquier.xyz> | 2025-02-17 15:09:51 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2025-02-17 15:09:51 +0900 |
commit | 6a8a7ce476bd5f042999a04a0d767b38ea6faec0 (patch) | |
tree | bca618f180df7e6216d3fd63fabd6312d0ee8277 /src | |
parent | 320545bfcfee9c6826d9ae96a880ec82fc03d860 (diff) | |
download | postgresql-6a8a7ce476bd5f042999a04a0d767b38ea6faec0.tar.gz postgresql-6a8a7ce476bd5f042999a04a0d767b38ea6faec0.zip |
Add information about WAL buffers full to VACUUM/ANALYZE (VERBOSE)
This commit adds the information about the number of times WAL buffers
have been full to the logs generated by VACUUM/ANALYZE (VERBOSE) and in
the logs generated by autovacuum, complementing the existing information
stored by WalUsage.
This is the last part of the backend code where the value of
wal_buffers_full can be reported, similarly to all the other fields of
WalUsage. 320545bfcfee and ce5bcc4a9f26 have done the same for EXPLAIN
and pgss.
Author: Bertrand Drouvot
Reviewed-by: Ilia Evdokimov
Discussion: https://postgr.es/m/Z6SOha5YFFgvpwQY@ip-10-97-1-34.eu-west-3.compute.internal
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/access/heap/vacuumlazy.c | 5 | ||||
-rw-r--r-- | src/backend/commands/analyze.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index a231854b1e6..911f68b413d 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -1125,10 +1125,11 @@ heap_vacuum_rel(Relation rel, VacuumParams *params, (long long) total_blks_read, (long long) total_blks_dirtied); appendStringInfo(&buf, - _("WAL usage: %lld records, %lld full page images, %llu bytes\n"), + _("WAL usage: %lld records, %lld full page images, %llu bytes, %lld buffers full\n"), (long long) walusage.wal_records, (long long) walusage.wal_fpi, - (unsigned long long) walusage.wal_bytes); + (unsigned long long) walusage.wal_bytes, + (long long) walusage.wal_buffers_full); appendStringInfo(&buf, _("system usage: %s"), pg_rusage_show(&ru0)); ereport(verbose ? INFO : LOG, diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index 5931d47fdb9..cd75954951b 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -832,10 +832,11 @@ do_analyze_rel(Relation onerel, VacuumParams *params, (long long) total_blks_read, (long long) total_blks_dirtied); appendStringInfo(&buf, - _("WAL usage: %lld records, %lld full page images, %llu bytes\n"), + _("WAL usage: %lld records, %lld full page images, %llu bytes, %lld buffers full\n"), (long long) walusage.wal_records, (long long) walusage.wal_fpi, - (unsigned long long) walusage.wal_bytes); + (unsigned long long) walusage.wal_bytes, + (long long) walusage.wal_buffers_full); appendStringInfo(&buf, _("system usage: %s"), pg_rusage_show(&ru0)); ereport(verbose ? INFO : LOG, |