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 1mQTWe-0002C0-Dd for pgsql-general@arkaria.postgresql.org; Wed, 15 Sep 2021 11:56:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mQTWd-0006Uq-Br for pgsql-general@arkaria.postgresql.org; Wed, 15 Sep 2021 11:56:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQTWd-0006Ui-2v for pgsql-general@lists.postgresql.org; Wed, 15 Sep 2021 11:56:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQTWa-00088E-FH for pgsql-general@lists.postgresql.org; Wed, 15 Sep 2021 11:56:26 +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 18FBuL8R972803; Wed, 15 Sep 2021 07:56:21 -0400 From: Tom Lane To: rob stone cc: A Z , "pgsql-general@lists.postgresql.org" Subject: Re: Basic Questions about PostgreSQL. In-reply-to: <61c72117499fc76f99542e2c889e8841b6e2db49.camel@gmail.com> References: <61c72117499fc76f99542e2c889e8841b6e2db49.camel@gmail.com> Comments: In-reply-to rob stone message dated "Wed, 15 Sep 2021 18:38:00 +1000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <972801.1631706981.1@sss.pgh.pa.us> Date: Wed, 15 Sep 2021 07:56:21 -0400 Message-ID: <972802.1631706981@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk rob stone writes: > On Wed, 2021-09-15 at 05:10 +0000, A Z wrote: >> -Is there a simple, immediate, straightforward way to temporarily >> disable PostgreSQL database >> use of all other users, except development users, or in fact just one >> user (one developer, yourself) >> so that maintenance on the data or the data model may be performed? > Read > https://www.postgresql.org/docs/13/app-postgres.html#id-1.9.5.14.6.5 > about single user mode. I think a better recommendation is to temporarily modify pg_hba.conf to disallow logins you don't want. Single-user mode is pretty limited, because what it really is is single-process mode: there will be no background support processes such as bgwriter, autovacuum, replication support, etc. The system runs, more or less, but performance is not going to be great. regards, tom lane