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 1qr7X2-002e8a-8P for pgsql-admin@arkaria.postgresql.org; Fri, 13 Oct 2023 02:04:04 +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 1qr7Wz-00D9ca-SA for pgsql-admin@arkaria.postgresql.org; Fri, 13 Oct 2023 02:04:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qr7Wz-00D9cR-HW for pgsql-admin@lists.postgresql.org; Fri, 13 Oct 2023 02:04:02 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qr7Wx-000Di0-RA for pgsql-admin@lists.postgresql.org; Fri, 13 Oct 2023 02:04:01 +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 39D23wjZ1430192; Thu, 12 Oct 2023 22:03:58 -0400 From: Tom Lane To: Zhaoxun Yan cc: Ron , pgsql-admin@lists.postgresql.org Subject: Re: Fwd: Why does pg_rewind deny permission for pg_read_binary_file() other than 'dbname=postgres'? In-reply-to: References: <90bfa111-85f5-a5db-4026-dc1587ab5a11@gmail.com> Comments: In-reply-to Zhaoxun Yan message dated "Fri, 13 Oct 2023 09:41:48 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1430190.1697162638.1@sss.pgh.pa.us> Date: Thu, 12 Oct 2023 22:03:58 -0400 Message-ID: <1430191.1697162638@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Zhaoxun Yan writes: > The results are the same, 'dbname=repmgr' is the root cause of the error, > since 'dbname=postgres' went well with both 'user=rep' and 'user=rewinder', > while 'dbname=repmgr' generates exactly the same error. As far as I can tell, you granted permissions on that function in the postgres database, but not any other database. Function permissions, like most others, are database-local in Postgres. regards, tom lane