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 1lHScl-0005X3-1M for pgsql-admin@arkaria.postgresql.org; Wed, 03 Mar 2021 14:37:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lHScj-0003c7-Qs for pgsql-admin@arkaria.postgresql.org; Wed, 03 Mar 2021 14:37:13 +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 1lHSbn-0003WN-I8 for pgsql-admin@lists.postgresql.org; Wed, 03 Mar 2021 14:36:15 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lHSbi-0001iI-JA for pgsql-admin@postgresql.org; Wed, 03 Mar 2021 14:36:14 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id EF3D324B95CD9 for ; Wed, 3 Mar 2021 07:36:07 -0700 (MST) Date: Wed, 3 Mar 2021 07:36:07 -0700 (MST) From: stephanhahn To: pgsql-admin@postgresql.org Message-ID: <1614782167978-0.post@n3.nabble.com> In-Reply-To: <1016718.1614705958@sss.pgh.pa.us> References: <1614698929965-0.post@n3.nabble.com> <1016718.1614705958@sss.pgh.pa.us> Subject: Re: make postgres readonly MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Tom, thanks for the reply. I set default_transaction_read_only = on for the user postgres (seemed to be more practical for me than preventing every access with pg_hba.conf and create an extra backup user). Up to now i didn't notice any unwanted effects resulting from this. There are also still many log entries of the sort 'automatic vacuum of table "tablename": index scans: 1' (and a few like "@ ERROR: canceling autovacuum task", which might have other reasons?), so this could suggest a working autovacuum daemon. But if you nevertheless think this approach can have any side effects (because postgres is not only a superuser, but is also used by the DB system), it seems to be too dangerous for me. -- Sent from: https://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html