Sorry, I failed to see the forest for the trees! The site is very clearly up so Postgres is not broken, and the PG error you first quoted must have been some transient error in the past.
This is a bug which has been fixed by this commit just a short while ago:
If you update Discourse again now, the error should go away.