Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qYrwC-002xpW-0a for pgsql-general@arkaria.postgresql.org; Wed, 23 Aug 2023 17:46:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qYrwA-00F6I5-Rt for pgsql-general@arkaria.postgresql.org; Wed, 23 Aug 2023 17:46:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qYrwA-00F6Hv-Gk for pgsql-general@lists.postgresql.org; Wed, 23 Aug 2023 17:46:34 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qYrw7-000cHE-VL for pgsql-general@lists.postgresql.org; Wed, 23 Aug 2023 17:46:33 +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 37NHkTNQ3382053; Wed, 23 Aug 2023 13:46:29 -0400 From: Tom Lane To: Hellen Jiang cc: "pgsql-general@lists.postgresql.org" Subject: Re: Read only user permission In-reply-to: References: Comments: In-reply-to Hellen Jiang message dated "Wed, 23 Aug 2023 16:42:06 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3382051.1692812789.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 23 Aug 2023 13:46:29 -0400 Message-ID: <3382052.1692812789@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hellen Jiang writes: > I have created readonly and readwrite roles with the following grants: h= owever, readonly user does not have access to the new tables created by re= adwrite user. (readonly user has the access to new tables created by admin= ). > Any idea how I can grant the access to readonly to make sure it has the = read access to NEW tables created by readwrite user? The readwrite user (not the admin) would need to issue ALTER DEFAULT PRIVILEGES granting that. regards, tom lane