Workaround for PostgreSQL errors

This should fix #896 as per scyllinice from https://en.ghost.org/forum/installation/393-bug-problem-with-postgresql-as-database