O
O
Oleg2015-04-27 16:55:05
PostgreSQL
Oleg, 2015-04-27 16:55:05

How to make PostgreSQL backup account work?

I made a batch file for backup using pg_dump. Everything works for the superuser, but you have to store the superuser password in text form in the batch file. I tried to create a backup user with the "REPLICATION" parameter.

CREATE ROLE postbackup LOGIN
  ENCRYPTED PASSWORD '########################'
  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE REPLICATION;

However, a message is thrown on the command line
pg_dump: [archiver (db)] query failed: ERROR:  permission denied for relation _yearoffset
pg_dump: [archiver (db)] query was: LOCK TABLE public._yearoffset IN ACCESS SHARE MODE

How to modify the user so that the update is launched, but a little more is no longer possible?
Tell me at least in which direction to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Swartalf, 2015-04-27
@Swartalf

Look here
https://jamie.curle.io/blog/creating-a-read-only-u...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question