Re: Database migration to RDS issues permissions - Mailing list pgsql-general
From | Fran ... |
---|---|
Subject | Re: Database migration to RDS issues permissions |
Date | |
Msg-id | AM4PR03MB174849845E708C65BCC2E4AB97B50@AM4PR03MB1748.eurprd03.prod.outlook.com Whole thread Raw |
In response to | Re: Database migration to RDS issues permissions (Adrian Klaver <adrian.klaver@aklaver.com>) |
Responses |
Re: Database migration to RDS issues permissions
|
List | pgsql-general |
Hi Adrian,
I followed you link and I had again errors:
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;
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;
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';
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'
);
De: Adrian Klaver <adrian.klaver@aklaver.com>
Enviado: sábado, 19 de noviembre de 2016 23:49
Para: Fran ...; pgsql-general@postgresql.org; tgl@sss.pgh.pa.us
Asunto: Re: [GENERAL] Database migration to RDS issues permissions
Enviado: sábado, 19 de noviembre de 2016 23:49
Para: Fran ...; pgsql-general@postgresql.org; tgl@sss.pgh.pa.us
Asunto: Re: [GENERAL] Database migration to RDS issues permissions
On 11/19/2016 11:12 AM, Fran ... wrote:
> Hi,
>
>
> You were right and I have tried to grant that role to user and I get
> following errors..
>
>
> /pg_restore: [archiver (db)] Error while PROCESSING TOC:/
> /pg_restore: [archiver (db)] Error from TOC entry 4335; 2606 151422 FK
> CONSTRAINT worker_id_refs_id_6fd8ce95 owneruser/
> /pg_restore: [archiver (db)] could not execute query: ERROR: relation
> "public.worker_status" does not exist/
> / Command was: ALTER TABLE ONLY public.worker_status DROP CONSTRAINT
> worker_id_refs_id_6fd8ce95;/
>
> /pg_restore: [archiver (db)] Error from TOC entry 4079; 1259 151046
> INDEX id_e owneruser/
> /pg_restore: [archiver (db)] could not execute query: ERROR: index
> "id_e" does not exist/
> / Command was: DROP INDEX public.id_e;/
>
> I run the dump from origin with postgres user.
>
Alright, I bit the bullet and set up a test Postgres RDS instance. The only way I
could get anything to load was to follow the instructions here:
http://dba.stackexchange.com/questions/66372/moving-a-postgres-database-from-standalone-local-db-to-amazon-rds
and that was only after finding a database that did not have plpythonu
installed as that is uninstallable.
So I ended up with:
pg_restore -C -d test -h testdb.xxxxxxxxxxx.rds.amazonaws.com -p 5432 -U rds_user --no-owner --no-privileges b_app.out
I think I will stick with my policy of not using RDS.
--
Adrian Klaver
adrian.klaver@aklaver.com
> Hi,
>
>
> You were right and I have tried to grant that role to user and I get
> following errors..
>
>
> /pg_restore: [archiver (db)] Error while PROCESSING TOC:/
> /pg_restore: [archiver (db)] Error from TOC entry 4335; 2606 151422 FK
> CONSTRAINT worker_id_refs_id_6fd8ce95 owneruser/
> /pg_restore: [archiver (db)] could not execute query: ERROR: relation
> "public.worker_status" does not exist/
> / Command was: ALTER TABLE ONLY public.worker_status DROP CONSTRAINT
> worker_id_refs_id_6fd8ce95;/
>
> /pg_restore: [archiver (db)] Error from TOC entry 4079; 1259 151046
> INDEX id_e owneruser/
> /pg_restore: [archiver (db)] could not execute query: ERROR: index
> "id_e" does not exist/
> / Command was: DROP INDEX public.id_e;/
>
> I run the dump from origin with postgres user.
>
Alright, I bit the bullet and set up a test Postgres RDS instance. The only way I
could get anything to load was to follow the instructions here:
http://dba.stackexchange.com/questions/66372/moving-a-postgres-database-from-standalone-local-db-to-amazon-rds
dba.stackexchange.com I have a working Ruby on Rails 4 app running locally on my Mac. I'm running Postgres locally. I want to move the database (and only the database, not the whole app ... |
and that was only after finding a database that did not have plpythonu
installed as that is uninstallable.
So I ended up with:
pg_restore -C -d test -h testdb.xxxxxxxxxxx.rds.amazonaws.com -p 5432 -U rds_user --no-owner --no-privileges b_app.out
I think I will stick with my policy of not using RDS.
--
Adrian Klaver
adrian.klaver@aklaver.com
pgsql-general by date: