mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
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.320545bfcf
andce5bcc4a9f
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
This commit is contained in:
@ -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,
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user