PostgreSQL CPU 100% after configure Wal log shipping hot standby
By exposing a database with a weak superuser password to the internet you invited somebody to break in and use your CPU for their own purposes, probably mining crypto-currencies.
Take the machine from the internet, wipe it clean and re-install the operating system. In the case of a hosted database, decommission the database and get a new one.
To protect yourself from this problem, choose good passwords.