-
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.
Revert "[#20300] YSQL: Disallow new-version DDL in an invalid per-db …
…catalog version configuration" Summary: This reverts commit 0ca855f. Background: 1. In the new upgrade work flow, there can be a significant window of tryout time after the new binaries are installed and the YSQL migration scripts are run which happens in the finalization stage. This is to allow the upgrade to rollback if the tryout does not turn out well. 2. An auto gflag must be RUNTIME but --ysql_enable_db_catalog_version should not be RUNTIME. So the plan is to make it a regular NON_RUNTIME gflag and on by default. This implies that during the tryout time the gflag is true but the table pg_yb_catalog_version remains in global catalog version mode: there is only one row for database template1. 3. Therefore it is unreasonable to disallow DDLs that increment catalog version during the tryout time. 4. It is still reasonable to advise customers not to run DDLs during finalization phase, which includes promote persistent auto gflags, and running YSQL migration scripts. The finalization phase isn't expected to take an extended period of time like the tryout phase. 5. I plan to make a change in a follow up diff to make an alternative fix for the issue #20300 by allowing `create index` statement during the tryout phase: when --ysql_enable_db_catalog_version_mode=true but the pg_yb_catalog_version isn't updated yet. NOTE: the reverted diff had a small change from elog(INFO, "change to per-db mode"); to elog(LOG, "change to per-db mode"); This change was not reverted in this diff. Jira: DB-9266 Test Plan: ./yb_build.sh --cxx-test pg_catalog_version-test Reviewers: jason, tverona Reviewed By: jason Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D32274
- Loading branch information
Showing
3 changed files
with
12 additions
and
75 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