Stop a Postgres restart (or error) taking the whole app down

Addresses #1854.
From the node pg API docs there doesn't seem to be any properties we can
check as in mysql. So perhaps we just set '_invalid' in the error handler
and check that in the validation function