From: | Nikhil Shetty <nikhil(dot)dba04(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Modify Bootstrap user ID |
Date: | 2024-02-22 13:31:55 |
Message-ID: | CAFpL5VwT+E-zfuU--g=5kp_rP2a57fzS4G-Bi+pDU+1Rh_0MOg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi Tom,
We tried by renaming the user but it has removed the md5 password from
pg_authid and we were not able to login
We had to reset the password to make it work
Thanks,
Nikhil
On Thu, 22 Feb 2024 at 00:09, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Nikhil Shetty <nikhil(dot)dba04(at)gmail(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Nikhil Shetty | 2024-02-22 13:34:40 | Re: Modify Bootstrap user ID |
Previous Message | srinivasan s | 2024-02-22 13:13:49 | Re: print cached SQL plans of a backend |