Re: A fixed user id for the postgres user? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: A fixed user id for the postgres user?
Date
Msg-id Pine.LNX.4.30.0108221756260.679-100000@peter.localdomain
Whole thread Raw
In response to Re: A fixed user id for the postgres user?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane writes:

> What I'm thinking is that if we hard-wired usesysid = 1 for the
> superuser, it'd be possible to arrange for standalone backends to fire
> up with that sysid and superuserness assumed, and not consult pg_shadow
> at all.  Then you'd have a platform in which you could do CREATE USER.

I had always figured that you could use bki to recover from these things,
but a quick attempt shows that you can't.

You proposal makes sense from a Unix admin point of view (booting into
single user mode without password).  Since we have a check against root
access and against too liberal PGDATA permissions, I think this would be
safe.  Possibly we need to guard against setgid problems as well.

> Next mind-bending problem: recover from DROP TABLE pg_class ;-)

Definitely BKI land.  But that usecatupd field does make some sense,
apparently.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: List response time...
Next
From: Peter Eisentraut
Date:
Subject: Re: Locale by default?