-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#22356] YSQL: make yb_get_range_split_clause robust using PG TRY CAT…
…CH block Summary: `yb_get_range_split_clause` is used by `ysql_dump` to generate YSQL table and index SPLIT AT VALUES clause for multi-tablet range-partitioned relation during backup. It fails to decode `GinNull` in GIN Index partition bounds. With the change in this diff, `yb_get_range_split_clause` checks for the existence of `GinNull` in partition bounds. If `GinNull` exists in partition bounds, an empty string is returned by `yb_get_range_split_clause`. Also, there might be other unknown cases where partition bounds decoding can fail, which blocks YB backup. Thus, protect the decoding in `yb_get_range_split_clause` with PG TRY CATCH block in case of decoding failure for the sake of YB backup. If decoding fails, a warning is thrown and an empty string is returned by `yb_get_range_split_clause`. Each time `yb_get_range_split_clause` returns an empty string for a multi-tablet range relation, during restore, the relation is repartitioned with correct partition boundaries. Jira: DB-11260 Test Plan: ./yb_build.sh --cxx-test yb-backup-cross-feature-test --gtest_filter YBBackupTest.TestYSQLTabletSplitGINIndexWithGinNullInPartitionBounds Reviewers: jason, mihnea Reviewed By: jason Subscribers: fizaa, ybase, yql Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D34965
- Loading branch information
Showing
4 changed files
with
153 additions
and
10 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