Re: role missing in dump

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: role missing in dump
Дата
Msg-id 201203021514.18388.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на role missing in dump  (Thomas Prause <tprause@imail.de>)
Список pgsql-general
On Friday, March 02, 2012 2:39:22 pm Thomas Prause wrote:
> Hi,
> when upgrading from 8.4 to 9.1 (Ubuntu 10.10 to 11.10) I did face some
> problems (probably due to a non standard data directory. But I don't
> care about that. Finally I decided to use the dump to recreate this very
> small database.
>
> When starting the application that uses the db I realized that a role
> (the only one I have created) was missing. Is this some bug in 8.4 that
> roles are not included in the dump or did I miss something?

Roles are global to a cluster. If you do a pg_dump you will get only the
information/data for a particular database. If you do pg_dumpall you will get
the information/data for all the databases in the cluster as well as the cluster
wide information. A compromise solution is to pg_dump a particular database and
then do pg_dumpall -g which dumps only the global information. See here for more
info:

http://www.postgresql.org/docs/9.0/interactive/app-pg-dumpall.html
http://www.postgresql.org/docs/9.0/interactive/app-pgdump.html

>
> Regards,
> Thomas

--
Adrian Klaver
adrian.klaver@gmail.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Thomas Prause
Дата:
Сообщение: role missing in dump
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Restoring selected records from backup file