X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2855E535F6 for ; Thu, 5 May 2005 14:34:40 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07543-03 for ; Thu, 5 May 2005 17:34:31 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 091B452956 for ; Thu, 5 May 2005 14:34:30 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j45HYTd9025149; Thu, 5 May 2005 13:34:29 -0400 (EDT) To: "David F. Skoll" Cc: pgsql-admin@postgresql.org Subject: Re: A real puzzler: ANY way to recover? In-reply-to: <427A5472.8060004@roaringpenguin.com> References: <427A5472.8060004@roaringpenguin.com> Comments: In-reply-to "David F. Skoll" message dated "Thu, 05 May 2005 13:14:26 -0400" Date: Thu, 05 May 2005 13:34:29 -0400 Message-ID: <25148.1115314469@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/50 X-Sequence-Number: 17479 "David F. Skoll" 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