On PostgreSQL v15 on Red Hat 9 today our database has crashed. Database has crashed because there was disk full in pg_wal directory. We have pg_wal directory on separate disk from the rest of database. We have currently 100 GB assigned as size of pg_wal disk, most of the time 50% of disk space on this disk is used, but today something has eaten the rest of 50 GB of WAL.
I assume there was some (or more) application that consumed all of the WAL disk in pg_wal directory without creating commit between SQL-s. Maybe some run away application.
I can see applications currently executing in pg_stat_activity. How to get current WAL file consumption by application? I assume to join pg_stat_activity with some other table/view?