From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Zhaoxun Yan <yan.zhaoxun@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: pg_rewind: ERROR: could not fetch remote file "global/pg_control": ERROR: permission denied
Date: Wed, 27 Sep 2023 10:06:17 +0200
Message-ID: <202309270806.qunez36qtlrp@alvherre.pgsql> (raw)
In-Reply-To: <CADEX6_UgD3KFEfFwDr0DJauqGDtqja9ELLV_Ny8OWyVZBRL9RQ@mail.gmail.com>
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)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: alvherre@alvh.no-ip.org, yan.zhaoxun@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: pg_rewind: ERROR: could not fetch remote file "global/pg_control": ERROR: permission denied
In-Reply-To: <202309270806.qunez36qtlrp@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox