Re: creation permissions when moving from 7.2 -> 7.4

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: creation permissions when moving from 7.2 -> 7.4
Дата
Msg-id 26787.1083892185@sss.pgh.pa.us
обсуждение исходный текст
Ответ на creation permissions when moving from 7.2 -> 7.4  (Kevin DeGraaf <kevin@kevindegraaf.net>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: CHECK constraints and optimizations
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Cache lookup failure for pg_restore?