Re: pg_dump roles support - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: pg_dump roles support
Date
Msg-id 20071210162233.GQ5031@tamriel.snowman.net
Whole thread Raw
In response to Re: pg_dump roles support  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_dump roles support  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> >   create role admin with noinherit;
> >   grant postgres to admin;
> >   grant admin to joesysadmin;
>
> >   pg_dump -U joesysadmin mydb;
>
> >   Fails because joesysadmin hasn't got rights to everything directly.
>
> Seems like the correct answer to that is "use a saner role
> configuration".

Funny, it's exactly the type of setup described here:
http://www.postgresql.org/docs/8.2/interactive/role-membership.html

Far as I can tell anyway.  What would you suggest?  The point here is
that joesysadmin shouldn't get full postgres privs on login since most
of the time he won't need them.  When he does need them, he can do a
'set role postgres', do what he needs to do and then 'reset role' when
he's done.  Minimizing the amount of time with superuser privs is a good
thing in general, I would think.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump roles support
Next
From: "Hiroshi Saito"
Date:
Subject: Re: Problem of a server gettext message.