Search Postgresql Archives

error on pg_restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I created a user pguser and gave it all the privileges on database RIC.

CREATE USER pguser WITH PASSWORD 'xyz123!';
GRANT ALL PRIVILEGES ON DATABASE "RIC" to pguser;

The database RIC was created by user postgres earlier.

Now, when I run the pg_restore I get an error:

xzcat "postgres-071215200001-database" | PGPASSWORD=xyz123! /opt/PostgreSQL/9.4/bin/pg_restore -h onxv0097 -U pguser -d RIC -c -p 5432 -v
pg_restore: connecting to database for restore
pg_restore: dropping CONSTRAINT recorder_pkey
pg_restore: dropping TABLE DATA recorder
pg_restore: dropping TABLE recorder
pg_restore: creating TABLE recorder
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 173; 1259 58915 TABLE recorder postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  must be member of role "postgres"
    Command was: ALTER TABLE recorder OWNER TO postgres;


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux