| From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
|---|---|
| To: | Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: pg_restore 12 "permission denied for schema" errors |
| Date: | 2022-10-22 17:00:46 |
| Message-ID: | b56a5976-54a0-af76-39fc-5f500736ace7@aklaver.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 10/22/22 09:41, Ron wrote:
> On 10/22/22 11:20, Adrian Klaver wrote:
>> On 10/20/22 14:34, Ron wrote:
>>> On 10/20/22 10:02, Adrian Klaver wrote:
>>>> On 10/20/22 06:20, Ron wrote:
>>>>> On 10/20/22 00:12, Tom Lane wrote:
>>
> I was afraid you were going to say that.
>
> The work-around is to:
> pg_dump $SRCDB --schema-only | grep -e '^\(GRANT|REVOKE\)' > all_GRANT.sql
> pg_dump $SRCDB --schema-only | grep OWNER > all_OWNER.sql
> pg_restore --jobs=X --no-owner $NEWDB
The above and below have me confused.
What is $NEWDB?
In above it seems to be a file and below a database name.
> psql $NEWDB -f all_OWNER.sql
> psql $NEWDB -f all_GRANT.sql
>
> This is, of course, why we need to test the backup/restore process.
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Kellerer | 2022-10-22 20:24:35 | Re: High CPU usage |
| Previous Message | Ron | 2022-10-22 16:41:31 | Re: pg_restore 12 "permission denied for schema" errors |