Re: Database migration to RDS issues permissions

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: "Fran (dot)(dot)(dot)" <Bryan691(at)hotmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, "tgl(at)sss(dot)pgh(dot)pa(dot)us" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Database migration to RDS issues permissions
Date: 2016-11-22 14:42:55
Message-ID: 09317f3f-4ef4-e2ba-f025-c912a34b8980@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/21/2016 03:34 PM, Fran ... wrote:
> Hi Adrian,
>
>
> I followed you link and I had again errors:

What was the command you used?

>
>
> /pg_restore: [archiver (db)] Error from TOC entry 4368; 2606 151317 FK
> CONSTRAINT type_id_3940becf ownersuser/
> /pg_restore: [archiver (db)] could not execute query: ERROR: constraint
> "type_id_3940becf" of relation "store" does not exist/
> / Command was: ALTER TABLE ONLY public.store DROP CONSTRAINT
> type_id_3940becf;/

Can't DROP what does not exist. The end result is the same anyway. You
can avoid this type of error with --if-exists.
> /
> /
> /pg_restore: [archiver (db)] Error from TOC entry 4273; 1259 1179680
> INDEX profile_id owneruser/
> /pg_restore: [archiver (db)] could not execute query: ERROR: index
> "profile_id" does not exist/
> / Command was: DROP INDEX public.profile_id;/

See above.

> /
> /
> /pg_restore: [archiver (db)] Error from TOC entry 4751; 0 0 COMMENT
> EXTENSION plpgsql /
> /pg_restore: [archiver (db)] could not execute query: ERROR: must be
> owner of extension plpgsql/
> / Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural
> language';/

Not adding a COMMENT, not necessarily fatal. Best guess plpgsql is
actually installed, have you checked?

> /
> /
>
> /pg_restore: [archiver (db)] Error from TOC entry 4756; 0 0 USER MAPPING
> USER MAPPING dwhuser SERVER pg_rest postgres/
> /pg_restore: [archiver (db)] could not execute query: ERROR: role
> "user" does not exist/
> / Command was: CREATE USER MAPPING FOR user SERVER pg_rest OPTIONS (/
> / password 'XXXXX',/
> / "user" 'user'/
> /);/

This is probably because you could not import the global roles from your
original database.

>
> Regards.
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2016-11-22 14:46:15 Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used
Previous Message Poul Kristensen 2016-11-22 14:22:28 Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used