Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGjAa-0004Td-5k for pgsql-general@arkaria.postgresql.org; Thu, 19 Aug 2021 14:37:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mGjAZ-000347-5K for pgsql-general@arkaria.postgresql.org; Thu, 19 Aug 2021 14:37:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGjAY-00033z-Sh for pgsql-general@lists.postgresql.org; Thu, 19 Aug 2021 14:37:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGjAX-0002vk-0Y for pgsql-general@postgresql.org; Thu, 19 Aug 2021 14:37:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 17JEbJEC1703942; Thu, 19 Aug 2021 10:37:19 -0400 From: Tom Lane To: "David G. Johnston" cc: "sivapostgres@yahoo.com" , Pgsql-general General Subject: Re: How to detach a database In-reply-to: References: <195210005.137441.1629382861380.ref@mail.yahoo.com> <195210005.137441.1629382861380@mail.yahoo.com> Comments: In-reply-to "David G. Johnston" message dated "Thu, 19 Aug 2021 07:24:28 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1703940.1629383839.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 19 Aug 2021 10:37:19 -0400 Message-ID: <1703941.1629383839@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Thursday, August 19, 2021, sivapostgres@yahoo.com > wrote: >> Is there any way to make a PG database either in-active or switch to >> single-user mode ? We want to avoid DELETE database process. > Probably can do it via changing the pg_hba.conf file. Either that or revoke public CONNECT privilege on the database. regards, tom lane