pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Can multiple users own and maintain a database?
2+ messages / 2 participants
[nested] [flat]

* Can multiple users own and maintain a database?
@ 2009-03-10 19:50  Peter M. Van Buren <petervanburen@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Peter M. Van Buren @ 2009-03-10 19:50 UTC (permalink / raw)
  To: pgsql-admin

Hello,

I have a group of users who are running a maintenance-intensive database.
This database needs to be vacuumed and dumped as often as every couple of
hours.  The database owner has asked me to make multiple users all be
co-owners of the database.  He wants all of these users to be able to vacuum
and dump the database when needed.  The database owner does not want to have
a db_owner account or a db_owner role - he'd like all of the users to be
able to sign in as themselves and perform maintenance.

I'm having a hard time figuring out if PostgreSQL can do what he wants.
Does anybody have experience creating a database with multiple owners like
this?

Thanks for your help!

~ Peter

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Can multiple users own and maintain a database?
@ 2009-03-10 20:03  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Peter M. Van Buren <petervanburen@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2009-03-10 20:03 UTC (permalink / raw)
  To: Peter M. Van Buren <petervanburen@gmail.com>; +Cc: pgsql-admin

"Peter M. Van Buren" <petervanburen@gmail.com> writes:
> I have a group of users who are running a maintenance-intensive database.
> This database needs to be vacuumed and dumped as often as every couple of
> hours.  The database owner has asked me to make multiple users all be
> co-owners of the database.  He wants all of these users to be able to vacuum
> and dump the database when needed.  The database owner does not want to have
> a db_owner account or a db_owner role - he'd like all of the users to be
> able to sign in as themselves and perform maintenance.

As far as vacuuming goes, in recent releases it should work to make all
the users members of a group role that owns the DB.  Dump I'm not so
sure about --- do you really want them all to be able to read each
others' tables?  If so, try giving the group role at least read
permission on each table, too.

Perhaps more to the point, why are you doing these things manually at all?
Surely dumps should be automated through a cron script or some such.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2009-03-10 20:03 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-03-10 19:50 Can multiple users own and maintain a database? Peter M. Van Buren <petervanburen@gmail.com>
2009-03-10 20:03 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox