Re: Modifying pg_shadow?

From: Oliver Fromme <olli(at)lurza(dot)secnetix(dot)de>
To: jhihn(at)paytimepayroll(dot)com (Jason Hihn)
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane), pgsql-novice(at)postgresql(dot)org
Subject: Re: Modifying pg_shadow?
Date: 2003-09-09 13:36:42
Message-ID: 200309091336.h89DagwT036238@lurza.secnetix.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Jason Hihn wrote:
> Tom Lane wrote:
>
> > > How do I back up the pg_ system tables?
> >
> > They aren't backed up as such; all the useful content is included in the
> > schema information output by pg_dump or pg_dumpall.
>
> What database name should pg_dump be given? This is a horrid omission from
> the online docs! Furthermore, there is also no system database listed in
> pg_database.

I think "pg_dumpall -g" is what you want. That _is_ in the
online docs.

However, I agree that restoring a complete PG cluster from
scratch seems to be somewhat difficult. You still have to
do a lot of things manually in order to get everything right
without missing anything. At least that's my impression.

> What I am trying to do, is I need Postgres to handle a thousand users and
> several hundred databases. I need somewhere to store what type the user is
> (our employee or a client's employee), along with a permission list for that
> user - what database(s) that person can access. I have not yet found
> something like a pg_grant table to tell me that. There must be one. What is
> it?

I think you might want to look at the relacl column of the
pg_class table.

However, in your case, it might be beneficial to store the
data about users in your own database, in a format which is
suitable for your use. You can then generate grant/revoke
commands from that if necessary. It would also be a lot
more portable than depending on the internal structure of
PG system tables.

Just my 0.02 Euro.

Regards
Oliver

--
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"One of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination
of their C programs."
-- Robert Firth

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jason Hihn 2003-09-09 13:57:09 Re: Modifying pg_shadow?
Previous Message Jason Hihn 2003-09-09 13:17:32 Re: Modifying pg_shadow?