-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#25362] YSQL: PG15: Block DDLs during ysql major upgrade
Summary: Block updates to the ysql catalog during ysql major (pg15) upgrade. For temp table DDLs, pg performs the write using the `force_catalog_modifications` flag. Updating this logic to also include the initdb, and binary upgrade (pg_upgrade) phases. yb-master rejects all updates to the ysql catalog during the ysql major upgrade, unless it has the `force_catalog_modifications` flag set. DDLs are allowed only after the upgrade has finalized (ysql catalog state `DONE`). In this state older catalog is fully blocked even if `force_catalog_modifications` flag is set. - Move catalog state related logic from `YsqlCatalogConfig` to `YsqlInitDBAndMajorUpgradeHandler`. - Move `YBIsMajorUpgradeInitDb` from `pg_yb_common.c` to `ybc_util.cc`, and cache the env var. - Disable YSQL webserver in binary upgrade mode. The webserver fails to start since it cannot bind to the port. The normal postgres process started by the tserver uses this port. This webserver is not needed, so instead of trying to assign another port, its better to not run it at all. - Remove warning line from `MasterTabletServer::GetMessenger`. The caller is expected to handle the nullptr, and so this is just spamming the logs. - Bumped the build to 2024.2.1.0-b116 - Handle the case where yb-master is downgraded in the middle of an ysql catalog upgrade by crashing the master with a friendly error message. Fixes #25362 Jira: DB-14586 Test Plan: ysql_major_upgrade_ddl_blocking-test Reviewers: smishra, telgersma Reviewed By: telgersma Subscribers: svc_phabricator, yql, ybase Differential Revision: https://phorge.dev.yugabyte.com/D40515
- Loading branch information
Showing
32 changed files
with
663 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.