Re: A real puzzler: ANY way to recover? - Mailing list pgsql-admin

From Tom Lane
Subject Re: A real puzzler: ANY way to recover?
Date
Msg-id 25148.1115314469@sss.pgh.pa.us
Whole thread Raw
In response to A real puzzler: ANY way to recover?  ("David F. Skoll" <dfs@roaringpenguin.com>)
List pgsql-admin
"David F. Skoll" <dfs@roaringpenguin.com> 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

pgsql-admin by date:

Previous
From: "David F. Skoll"
Date:
Subject: A real puzzler: ANY way to recover?
Next
From: Rosser Schwarz
Date:
Subject: Re: A real puzzler: ANY way to recover?