Re: creation permissions when moving from 7.2 -> 7.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kevin DeGraaf <kevin(at)kevindegraaf(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: creation permissions when moving from 7.2 -> 7.4
Date: 2004-05-07 01:09:45
Message-ID: 26787.1083892185@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kevin DeGraaf <kevin(at)kevindegraaf(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-05-07 01:23:23 Re: Cache lookup failure for pg_restore?
Previous Message Tom Lane 2004-05-07 01:02:21 Re: CHECK constraints and optimizations