The first patch, to flush the bgwriter's WAL stats to the stats collector, seems like a straightforward bug fix, so committed and backpatched that. Thank you!
I didn't look at the second patch.
-- Heikki LinnakangasNeon (https://neon.tech)