Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id AECEB6345B5 for ; Tue, 10 Mar 2009 17:04:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 44310-05 for ; Tue, 10 Mar 2009 17:04:01 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 6819B6344C9 for ; Tue, 10 Mar 2009 17:04:01 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n2AK3w2i002834; Tue, 10 Mar 2009 16:03:58 -0400 (EDT) To: "Peter M. Van Buren" cc: pgsql-admin@postgresql.org Subject: Re: Can multiple users own and maintain a database? In-reply-to: References: Comments: In-reply-to "Peter M. Van Buren" message dated "Tue, 10 Mar 2009 15:50:55 -0400" Date: Tue, 10 Mar 2009 16:03:58 -0400 Message-ID: <2833.1236715438@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/138 X-Sequence-Number: 31638 "Peter M. Van Buren" 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