cron command running postgres at high cpu I can see that a cron command is running under a postgres user and killing the CPU but I have no idea how it's being executed or how to stop it !
You've been hacked.  There has been a recent trend for crypto miners to hide their mining software by naming it 'cron'.  It is not the actual cron.

You probably had a poor password for your PostgreSQL superuser account (probably named "postgres"), which the hackers then used it to download and launch software as the OS user "postgres".  Or, maybe you had a poor password for the OS user "postgres", and they logged into that directly.

The paranoid approach is to nuke the machine from orbit and rebuild it.  The lax approach is to change your passwords (both OS and internal to PostgreSQL) and reboot, and check ~postgres/.ssh/authorized_keys for entries that shouldn't be there.