X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 765E8D1B557 for ; Fri, 14 Nov 2003 00:19:15 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 67382-03 for ; Thu, 13 Nov 2003 20:18:47 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 740B0D1B522 for ; Thu, 13 Nov 2003 20:18:44 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id hAE0If19015188; Thu, 13 Nov 2003 19:18:41 -0500 (EST) To: Peter Eisentraut Cc: DHS Webmaster , pgsql-admin@postgresql.org Subject: Re: dropped users appear as numbers in ACL In-reply-to: References: Comments: In-reply-to Peter Eisentraut message dated "Fri, 14 Nov 2003 01:10:55 +0100" Date: Thu, 13 Nov 2003 19:18:41 -0500 Message-ID: <15187.1068769121@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/260 X-Sequence-Number: 11247 Peter Eisentraut writes: > Tom Lane writes: >> I'm not sure there's any really good answer to this short of changing >> the way that users and databases work, which so far no one has wanted >> to do. > One possibility would be to have an explicit "flush privileges" command > that you can run over a database to clean up after this. That might also > help to support grant options on groups, which suffer from a similar > can't-look-into-other-databases problem. One thing that would go a long way towards alleviating the problem is to get rid of user-selectable sysids for users and groups, and instead assign the sysids from a cluster-wide sequence (or equivalently, revert to using OIDs as user/group identifiers). Then dead privileges wouldn't come back to life as belonging to some newly-created user. You could imagine making vacuum delete ACL entries for no-longer-known users, or put it into a separate cleanup operation as Peter suggests. However, that has its own downside. IIRC, the reason we haven't done this already is that if you unintentionally drop a user who still owns objects, it's nice to be able to resurrect him with the same sysid. The cross-database problem makes it hard to prevent such mistakes with dependencies. Maybe rather than a flat prohibition of WITH SYSID, just change the default assignment to be from a sequence rather than the error-prone MAX()+1 behavior? regards, tom lane