Re: pg_rewind: ERROR: could not fetch remote file "global/pg_control": ERROR: permission denied

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Zhaoxun Yan <yan(dot)zhaoxun(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_rewind: ERROR: could not fetch remote file "global/pg_control": ERROR: permission denied
Date: 2023-09-27 08:06:17
Message-ID: 202309270806.qunez36qtlrp@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Daulat 2023-09-27 08:10:10 Upgrade postgres 14.6 to minor version using source code
Previous Message Laurenz Albe 2023-09-27 07:52:42 Re: Corruption issue