Skip to content

2.25.1.0-b207

Summary:
This change enforces the following:
- Create and drop db are blocked during upgrade.
- We can upgrade even when the `postgres` and `system_platform` databases are dropped
- We cannot upgrade if the `yugabyte` database is dropped. We need one non-template database in order to upgrade and the `yugabyte` database is the only one that is guaranteed to exist.
- Roles with special characters are handled correctly. e5ced7fec738731d6de61b0fb77f4e287b44cf18/D41171 introduced a regression which is now fixed.
- Passwords with special characters are handled correctly.
- Upgrade works even if the `yugabyte` user has a `NULL` password.
- Add checks to make sure the `yugabyte` and the user running the dump part of pg_upgrade has the correct attributes.

Additionally,
- `IsYsqlMajorVersionCatalogUpgrade` has been replaced with `IsMajorUpgradeInProgress` which covers the entire upgrade window instead of just the catalog upgrade.
- We now only pass the oid for `template0` and `yugabyte` dbs to initdb, since those are the only dbs that are created.
- `VerifyDroppedColumnsForUpgrade` is in a code path that is never reached so removing it.
- Aligning the error messages around blocked DDLs.

Fixes #25672
Jira: DB-14930

Test Plan:
YsqlMajorUpgradeDdlBlockingTest.CreateAndDropDBs
Pg15UpgradeTest.UsersAndRoles
Pg15UpgradeTestWithAuth.NoYugabyteUserPassword

Reviewers: telgersma, smishra

Reviewed By: telgersma

Subscribers: ybase, yql

Differential Revision: https://phorge.dev.yugabyte.com/D41251
Assets 2
Loading