Re: Modify Bootstrap user ID

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Modify Bootstrap user ID
Дата
Msg-id 95373.1708540758@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Modify Bootstrap user ID  (Nikhil Shetty <nikhil.dba04@gmail.com>)
Ответы Re: Modify Bootstrap user ID
Список pgsql-admin
Nikhil Shetty <nikhil.dba04@gmail.com> writes:
> We want to upgrade a postgres v13 database to v16. but the bootstrap user
> used to initialise the database for both are different
> Can we update the bootstrap user for v13 ? like assign oid as 10 in
> pg_authid?

Do not try to change role OIDs --- you will certainly miss some
places where the OID appears.  You can rename it though.

You might have tried this:

regression=# alter user postgres rename to pgsql;
ERROR:  session user cannot be renamed

but it's easy to get around that:

regression=# create user joe superuser;
CREATE ROLE
regression=# \c - joe
You are now connected to database "regression" as user "joe".
regression=# alter user postgres rename to pgsql;
ALTER ROLE
regression=# \c - pgsql
You are now connected to database "regression" as user "pgsql".
regression=# drop user joe;
DROP ROLE

            regards, tom lane



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

Предыдущее
От: Nikhil Shetty
Дата:
Сообщение: Modify Bootstrap user ID
Следующее
От: Rajesh Kumar
Дата:
Сообщение: Re: Wraparound