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 1qlPYw-002fxd-6I for pgsql-admin@arkaria.postgresql.org; Wed, 27 Sep 2023 08:06:26 +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 1qlPYu-001Ps3-Sz for pgsql-admin@arkaria.postgresql.org; Wed, 27 Sep 2023 08:06:24 +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 1qlPYu-001Prg-Fq for pgsql-admin@lists.postgresql.org; Wed, 27 Sep 2023 08:06:24 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlPYr-007qzz-8L for pgsql-admin@lists.postgresql.org; Wed, 27 Sep 2023 08:06:23 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 027585C02CC; Wed, 27 Sep 2023 04:06:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 27 Sep 2023 04:06:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1695801979; x= 1695888379; bh=tHxliK7+Mr43lstwZ0OZOj0XtvUwbM46l4R+Xu5fYso=; b=C q9R1DTDNnbdwou32q2E/ofsBclbZHtdjVR1k8u89/qDes82yXWrNlkd64paz7lwg VcrB1T5/29mBeEug+aElLYVcad8xn7dhAkLu7yaJf66lbYH4dZmq3mdjMAiKwvZT IaKU3WSYjbm1tFA2uN/aNLW2o5e5O15WtUHg2bO8TqcAxmF4wU2Tb4kt/XMY1U9s mG5C1iPXJhXsUPK2xqhSvgNlYv61uDrE4ki2dHIlj8Hs7nkR5jGMyMuCGmG5m0RY D4dU7s3hzt3Jh874TuGr0pwhvfoxYcIxaruoQPNXafnbb3huK/rRKVh0ACBObTWW ZgVdznElSOsMNFmleVBbA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvjedrtddugdduvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 27 Sep 2023 04:06:19 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1695801977; bh=WM9gSMHM/bjojuYdDXeORnABXvS1HqpF1jEOzEV9njM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=QkN/A/7BRwGFEomX2GcMf4BwRhuzEZYx6u8Dn7BOJD99Wg3oRFiSvELnn1OXyqdPR HaBaJ1cSbxmBr0CxgjPiuljhRdK6CZNrpJUqgPoC4tv/BqCMLq4bW/N2wB6rDPJ3A4 pQLWiVRTOcoS1bUi6ix+5ShFcwPvAgq9gf1Z3rBN/s+P/WPBK/Q6JPb39IN6lkY7NI Wq1IGKVFlqsrS0UWbJrj3O1D2qBLisYDuTHOHscMMyQpDMED/7KNw8nU3wIEs4GeCi 4yloEw5FA9Vp2IGt841Kz49rgaNwYXEYTHFlIsyke2VQ0zFKRhHWnyH9fNXyiTOTmE i/J6zvH+dYkKA== Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 50647B7; Wed, 27 Sep 2023 10:06:17 +0200 (CEST) Date: Wed, 27 Sep 2023 10:06:17 +0200 From: Alvaro Herrera To: Zhaoxun Yan Cc: Pgsql-admin Subject: Re: pg_rewind: ERROR: could not fetch remote file "global/pg_control": ERROR: permission denied Message-ID: <202309270806.qunez36qtlrp@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Sep-26, Zhaoxun Yan wrote: > Actually I have grant function pg_read_binary_file's execution right to the > user rep, and here are the setup for this role: > > CREATE EXTENSION repmgr; > GRANT pg_checkpoint TO rep; > GRANT pg_read_all_stats TO rep; > GRANT EXECUTE ON function pg_catalog.pg_ls_dir(text, boolean, boolean) TO rep; > GRANT EXECUTE ON function pg_catalog.pg_stat_file(text, boolean) TO rep; > GRANT EXECUTE ON function pg_catalog.pg_read_binary_file(text) TO rep; > GRANT EXECUTE ON function pg_catalog.pg_read_binary_file(text, bigint, > bigint, boolean Maybe you did this in the wrong database? Keep in mind that function privileges are per database. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "People get annoyed when you try to debug them." (Larry Wall)