Re: - Mailing list pgsql-general

From Alex Luya
Subject Re:
Date
Msg-id CAL6j_s84WQV=yN-No_6kU5wYk1YruXBXmj0N5B805uW0h44msQ@mail.gmail.com
Whole thread Raw
In response to Re:  (Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org>)
Responses Re:  ("Charles Clavadetscher" <clavadetscher@swisspug.org>)
Re:  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Ubuntu 14.04 64bit + postgresql 9.4 are used here;

What I have done are:

1,Sign In ubuntu by user alex

2,then:sudo -i -u postgres

3,then:psql jump into command client

4,then: create database icare;

5,then: \q jump out command client

6,then run: exit jump out psql

7,then pg_restore --clean --create --exit-on-error --dbname=icare icare-test.tar


On Fri, Nov 13, 2015 at 10:52 PM, Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org> wrote:
Hello,

Il giorno ven, 13/11/2015 alle 13.38 +0800, Alex Luya ha scritto:
> Hello,
>        I created a new database by 
>        create database icare;
>        then quit off psql and  run:
>         pg_restore --clean --create --exit-on-error --dbname=icare
> icare-test.tar
>          it complains:
>           pg_restore: [archiver (db)] Error while PROCESSING TOC:
>           pg_restore: [archiver (db)] Error from TOC entry 21; 2615
> 80924 SCHEMA icare icare
>           pg_restore: [archiver (db)] could not execute query: ERROR:
>  permission denied for database icare
>            Command was: CREATE SCHEMA icare;

From what I understand, it means that the postgresql user that is
restoring the dump cannot create a schema on "icare" database. So, is
that user the same that issued che "create database" earlier? If it's
not, then you should grant all required priviledges to that user.

Bye,
Giuseppe


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: fast refresh materialized view
Next
From: "Charles Clavadetscher"
Date:
Subject: Re: