Manual upgrade fails

That PG 9.3 is really old, and it doesn’t sound right for a v1.9 Discourse install.

If I were you I would make a backup, create a new host with an up to date Discourse, restore the backup and move the hostname to the new server.