Hi,
Thank you for your work!
1. Perhaps In EXPLAIN you forget to check that usage->wal_buffers_full > 0:
if ((usage->wal_records > 0) || (usage->wal_fpi > 0) ||
(usage->wal_bytes > 0))
2. I have a small suggestion for pg_stat_statements: would it make sense
to move wal_buffers_full next to wal_records, wal_fpi and wal_bytes?
This way, all WAL-related information would be grouped together.
--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC.