Wednesday, September 1, 2021

[google-cloud-sql-discuss] Upgrade GCP hosted PostgreSQL while keeping existing user passwords

I have been tasked with upgrading our existing GCP hosted PostgreSQL databases from version 9.6 to version 13.

say that we need to create a new database and then
"Make sure the target instance has... The same user accounts, with the same PostgreSQL privileges and passwords"

We have a number of databases with dozens of users and roles, we allow users to connect directly and set their own passwords.
We would like to perform the database upgrade without changing all the passwords.

I've looked at using pg_dumpall to copy the users to a new database, but it fails as I don't have permission to read pg_authid.
It seems that we need a superuser account to be able to read pg_authid, and GCP does not permit superuser accounts.

Is there any way to upgrade the databases and keep the existing passwords?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/1cfa368f-aa5d-4d70-8991-5c6d13c447a9n%40googlegroups.com.

No comments:

Post a Comment