From: | "Andrus" <kobruleht2(at)hot(dot)ee> |
---|---|
To: | "Justin" <zzzzz(dot)graf(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to restore roles without changing postgres password |
Date: | 2020-02-12 07:31:48 |
Message-ID: | 4D6B3F5D59EA48A0BF711C8E461D6388@dell2 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs pgsql-general |
Hi!
Thank you.
>pg_dumpall creates an SQL file which is just a simple text file
>you can then edit sql removing postgres user from the file
>This can be automated in a script that searches the generated sql file for the postgres user replacing it with a blank/empty line or adds -- to the bringing of >the line which comments it out.
This script creates cluster copy in every night. So this should be done automatically.
I have little experience with Linux.
Can you provide example, how it should it be done using sed or other tool.
There is also second user named dbandmin whose password cannot changed also.
It would be best if CREATE ROLE and ALTER ROLE clauses for postgres and dbadmin users are removed for file.
Or if this is not reasonable, same passwords or different role names can used in both clusters.
Also I dont understand why GRANTED BY clauses appear in file. This looks like noice.
GRANT documentation
https://www.postgresql.org/docs/current/sql-grant.html
does not contain GRANTED BY clause. It looks like pg_dumpall generates undocumented clause.
Andrus.
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2020-02-12 09:25:05 | COPY performance vs insert |
Previous Message | Corey Huinker | 2020-02-12 04:22:43 | Re: Add A Glossary |
From | Date | Subject | |
---|---|---|---|
Next Message | Josef Šimánek | 2020-02-12 08:39:19 | Re: JIT on Windows with Postgres 12.1 |
Previous Message | Anthony Nowocien | 2020-02-12 07:22:42 | Re: POLL: Adding transaction status to default psql prompt |