pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: DHS Webmaster <webmaster@dhs-club.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: dropped users appear as numbers in ACL
Date: Thu, 13 Nov 2003 19:18:41 -0500
Message-ID: <15187.1068769121@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.44.0311140109050.17499-100000@peter.localdomain>
References: <Pine.LNX.4.44.0311140109050.17499-100000@peter.localdomain>

Peter Eisentraut <peter_e@gmx.net> 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



view thread (5+ messages)

Message-ID: <15187.1068769121@sss.pgh.pa.us>
Permalink:  ../15187.1068769121@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15187.1068769121@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter_e@gmx.net, webmaster@dhs-club.com
  Subject: Re: dropped users appear as numbers in ACL
  In-Reply-To: <15187.1068769121@sss.pgh.pa.us>
  References: <Pine.LNX.4.44.0311140109050.17499-100000@peter.localdomain> <15187.1068769121@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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