pg_walinspect allows for the contents of write-ahead logs (WAL) files to be inspected from SQL.
pg_walinspect