I have a legacy system that uses `Posgresql 9.6` and `Ubuntu 16.04`. Everything was fine several days ago even with standard Postgresql settings. I dumped a database with the compression option (maximum compression level -Z 9) in order to have a smaller size (`pg_dump --compress=9 database_name > database_name.sql`). After that I got a lot of problems.
You describe taking a dump of the database, but don't describe doing anything with it. Did you replace your system with one restored from that dump? If so, did vacuum and analyze afterwards?
Cheers,
Jeff