RES: Phantom groups

Lists: pgsql-general
From: "Carlos H(dot) Reimer" <carlosreimer(at)terra(dot)com(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Phantom groups
Date: 2006-07-04 02:08:54
Message-ID: PEEPKDFEHHEMKBBFPOOKGEHBDCAA.carlosreimer@terra.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi,

I´m planning to migrate from 7.4 to 8.0.7 and I discovered some strange
behavior during migration.

pg_dump inserted GRANT to phantom groups. They do not exist in pg_group;

When the script created by pg_dump is processed by psql during restore,
these GRANTs produce a lot of errors.

How could I fix it?

Reimer


From: Chris <dmagick(at)gmail(dot)com>
To: carlosreimer(at)terra(dot)com(dot)br
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Phantom groups
Date: 2006-07-05 03:41:59
Message-ID: 44AB3507.2020609@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Carlos H. Reimer wrote:
> Hi,
>
> I´m planning to migrate from 7.4 to 8.0.7 and I discovered some strange
> behavior during migration.
>
> pg_dump inserted GRANT to phantom groups. They do not exist in pg_group;
>
> When the script created by pg_dump is processed by psql during restore,
> these GRANTs produce a lot of errors.

pg_dump won't include users and groups. pg_dumpall would include that
information but of course includes all databases.

If you use the --no-privileges option with pg_dump it won't include the
grant/revoke statements.

http://www.postgresql.org/docs/8.0/static/app-pgdump.html

--
Postgresql & php tutorials
http://www.designmagick.com/


From: "Carlos H(dot) Reimer" <carlosreimer(at)terra(dot)com(dot)br>
To: "Chris" <dmagick(at)gmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: RES: Phantom groups
Date: 2006-07-05 10:20:57
Message-ID: PEEPKDFEHHEMKBBFPOOKIEIFDCAA.carlosreimer@terra.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Sorry, I would like to say pg_dumpall and not pg_dump.

--no-privileges is an option but I need to restore the privileges. There are
a lot of them in the system, many many objects and privileges.

> -----Mensagem original-----
> De: Chris [mailto:dmagick(at)gmail(dot)com]
> Enviada em: quarta-feira, 5 de julho de 2006 00:42
> Para: carlosreimer(at)terra(dot)com(dot)br
> Cc: pgsql-general(at)postgresql(dot)org
> Assunto: Re: [GENERAL] Phantom groups
>
>
> Carlos H. Reimer wrote:
> > Hi,
> >
> > I´m planning to migrate from 7.4 to 8.0.7 and I discovered some strange
> > behavior during migration.
> >
> > pg_dump inserted GRANT to phantom groups. They do not exist in pg_group;
> >
> > When the script created by pg_dump is processed by psql during restore,
> > these GRANTs produce a lot of errors.
>
> pg_dump won't include users and groups. pg_dumpall would include that
> information but of course includes all databases.
>
> If you use the --no-privileges option with pg_dump it won't include the
> grant/revoke statements.
>
> http://www.postgresql.org/docs/8.0/static/app-pgdump.html
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>
>


From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Chris <dmagick(at)gmail(dot)com>
Cc: carlosreimer(at)terra(dot)com(dot)br, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Phantom groups
Date: 2006-07-05 19:11:30
Message-ID: 1152126690.13851.39.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Tue, 2006-07-04 at 22:41, Chris wrote:
> Carlos H. Reimer wrote:
> > Hi,
> >
> > I´m planning to migrate from 7.4 to 8.0.7 and I discovered some strange
> > behavior during migration.
> >
> > pg_dump inserted GRANT to phantom groups. They do not exist in pg_group;
> >
> > When the script created by pg_dump is processed by psql during restore,
> > these GRANTs produce a lot of errors.
>
> pg_dump won't include users and groups. pg_dumpall would include that
> information but of course includes all databases.

Alternately, if you give pg_dumpall the -g switch, you'll get just that
global user data.


From: Chris <dmagick(at)gmail(dot)com>
To: carlosreimer(at)terra(dot)com(dot)br
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: RES: Phantom groups
Date: 2006-07-06 00:11:41
Message-ID: 44AC553D.4050507@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Carlos H. Reimer wrote:
> Sorry, I would like to say pg_dumpall and not pg_dump.
>
> --no-privileges is an option but I need to restore the privileges. There are
> a lot of them in the system, many many objects and privileges.

pg_dumpall *does* dump all the permissions properly.

What options / switches exactly are you using with pg_dumpall?

--
Postgresql & php tutorials
http://www.designmagick.com/