Thread: role missing in dump
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? Regards, Thomas
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
> 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. Thanks a lot for pointing this out. I was pretty sure that I did miss something - could not imagine that this is a bug. Regards, Thomas