Re: creation permissions when moving from 7.2 -> 7.4 - Mailing list pgsql-general

From Tom Lane
Subject Re: creation permissions when moving from 7.2 -> 7.4
Date
Msg-id 26787.1083892185@sss.pgh.pa.us
Whole thread Raw
In response to creation permissions when moving from 7.2 -> 7.4  (Kevin DeGraaf <kevin@kevindegraaf.net>)
List pgsql-general
Kevin DeGraaf <kevin@kevindegraaf.net> writes:
>   Restoring from [ajp.tar] ...
>   pg_restore: [archiver (db)] could not execute query: ERROR:
>   permission denied to create database

> Given that (a) I'm using PGUSER=postgres and (b) my pg_hba.conf should be
> sufficiently liberal anyway, I'm wondering why this is not working.

I think you've got the other user not permitted to create databases?
I believe 7.4's pg_dump creates a script that handles this case
correctly, but 7.2's doesn't.  (A hint for next time is that it's
usually best to use the latest available pg_dump.)

> Also, template0 failed due to a null tar file, and template1 failed due to
> it already existing.  Would I be correct in assuming that the globals.sql
> step takes care of the necessary items in template1, and that I can leave
> template0 alone altogether?

template0 is do-not-touch.  You need only worry about template1 if you
created stuff in it to have copied to other databases by CREATE
DATABASE.  (The most common thing of that sort is procedural languages;
you'd be best advised to use "createlang" to reinsert them anyway.)

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: CHECK constraints and optimizations
Next
From: Tom Lane
Date:
Subject: Re: Cache lookup failure for pg_restore?