Re: pg_rewind: ERROR: could not fetch remote file "global/pg_control": ERROR: permission denied - Mailing list pgsql-admin

From Alvaro Herrera
Subject Re: pg_rewind: ERROR: could not fetch remote file "global/pg_control": ERROR: permission denied
Date
Msg-id 202309270806.qunez36qtlrp@alvherre.pgsql
Whole thread Raw
In response to pg_rewind: ERROR: could not fetch remote file "global/pg_control": ERROR: permission denied  (Zhaoxun Yan <yan.zhaoxun@gmail.com>)
List pgsql-admin
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)



pgsql-admin by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Corruption issue
Next
From: Daulat
Date:
Subject: Upgrade postgres 14.6 to minor version using source code