"David F. Skoll" <dfs@xxxxxxxxxxxxxxxxxx> writes: > Supposing someone stupidly did this: > UPDATE pg_database SET datallowconn = false; > and then closed all the connections to the server. > Is there any way to recover short of nuking everything and > restoring from a backup dump? :-( That would be a bad move. I wonder whether we should allow a standalone backend (postgres) to connect regardless of datallowconn. The tradeoff is that you could break your template0 slightly more easily, but you can break template0 anyway if you are determined. If you have actually done that :-(, my recommendation would be to build a modified backend with the check in src/backend/utils/init/postinit.c diked out ... regards, tom lane