pgsql: Guard local backend against exceptions. When pgsql objects where destructed forcibly, the pgsql-local backend sometimes died due to attempted accesses in destructed objects.