A fixed user id for the postgres user?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема A fixed user id for the postgres user?
Дата
Msg-id Pine.LNX.4.30.0108191838150.677-100000@peter.localdomain
обсуждение исходный текст
Ответы Re: A fixed user id for the postgres user?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: A fixed user id for the postgres user?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
We've had some problem reports that the current practice of initdb
assigning to the postgres user the same usesysid as the user id of the
Unix user running initdb has caused some clashes.

(Imagine this scenario:  A few years ago you installed BluePants Linux
5.0, created a user for PostgreSQL, id 501, created a database.  Later you
created a few real users, which get uids 502, 503, etc.  Then you
pg_dumpall that database (which saves the sysid).  Now you install
BluePants Linux 7.0 on a new box, create a new user for PostgreSQL, which
turns out to be 502, because foolishly you created a user for TheirSQL
first.  So now you replay your pg_dumpall and you have two users with id
502.  Boom.)

One idea to resolve this, by getting rid of the usesysid column in favour
of the oid column has fallen by the wayside (for some valid reasons), so
the problem remains.  I think the simplest fix would be to assign a fixed
usesysid of 1.  There still is the possibility of changing that with an
initdb option, as there always has been.  (We could also ensure that
CREATE USER never assigns ids below, say, 10, so that if for who knows
what reason we decide to add more users into the bootstrap installation we
have some room.)

Comments?

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Guide to PostgreSQL source tree
Следующее
От: Neil Padgett
Дата:
Сообщение: Re: Guide to PostgreSQL source tree