Skip to content

2.25.0.0-b202

@foucher foucher tagged this 24 Oct 18:15
Summary:
YB commit d1bc1cc77f4a7ceb5978ec2a8e829f1c66dc9f1c fixed certain cases of upgrading tables, by working around a limitation in DDL handling where a single transaction cannot mix DDLs with modifications to the PG catalog. The workaround in the commit causes catalog creation statements for the YSQL major version upgrade to be sent to the backend one at a time, split on semicolons, with parsing accommodations only for single- and double-quoted strings. Because of the very limited parsing, the workaround causes the upgrade to fail if there are functions with embedded semicolons within dollar-quoted string constants, which is common.

Because the only known relevant cases of needing to do both DDLs and modifications to the PG catalog during the upgrade are with table creation, limit the scope of the workaround to tables only. This change means that parsing for functions is now done by the backend, rather than using a limited parser, which avoids the parsing failure.

There is one other case that would break under this change, which is the upgrade of pg_largeobject. Since pg_largeobject is unsupported by YB, rather than special casing it as well, deactivate the code to upgrade it.
Jira: DB-13605

Test Plan:
Jenkins

On MacOS arm64:
  ./yb_build.sh release --sj --skip_tests
  ./yb_build.sh release --cxx-test pg15_upgrade-test --with_tests
  pg15_tests/get_shell_test_specs.sh | grep upgrade | pg15_tests/run_tests.sh

On AlmaLinux 8:
  ./yb_build.sh fastdebug --gcc11 --sj --skip_tests
  ./yb_build.sh fastdebug --gcc11 --cxx-test pg15_upgrade-test --with_tests
  pg15_tests/get_shell_test_specs.sh | grep upgrade | pg15_tests/run_tests.sh

Reviewers: fizaa

Reviewed By: fizaa

Subscribers: yql

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