pg_rewind and replication user

From: Wiwwo Staff <wiwwo(at)wiwwo(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: pg_rewind and replication user
Date: 2023-02-01 14:09:20
Message-ID: CAFe70G5SN=MoKDwAWv62mcSdjsDU9r_jyvOE7qU_ya65=VbuFw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!
Provided my replication user created with
CREATE USER repl_user REPLICATION LOGIN ENCRYPTED PASSWORD'....';

If I run pg_rewing referring to this user
postgres(at)host1:~: pg_rewind -D $PGDATA --source-server="host=nre_primary
port=5432 user=repl_user passfile='/var/lib/postgresql/.pgpass'
dbname=postgres" -P -R

I get
pg_rewind: connected to server
pg_rewind: error: could not fetch remote file "global/pg_control": ERROR:
permission denied for function pg_read_binary_file

My question/doubt is: i can need to run pg_rewind referring to a superuser
only? Or i am "just" forgetting some grant to the replication user?

Thanks!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mateusz Henicz 2023-02-01 14:37:19 Re: pg_rewind and replication user
Previous Message Erik Wienhold 2023-02-01 12:38:11 Re: moving a database to a new 15.1 server