Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#18645] YSQL: Mitigate upgrade failure on yb_backend_xid add column.
Summary: D26677 introduced the yb_backend_xid column to pg_stat_get_activity. The corresponding migration script UPDATES the existing row for pg_stat_get_activity to add the new column. This seemingly causes flakiness during upgrades owing to the fact that the system table update command does not update the local cat cache. Subsequent to updation of the local cat cache, the views that are based on pg_stat_get_activity are recreated. During this process, the out of date cat cache throws an error that the new column is not found. To mitigate this, this revision replaces the UPDATE with a DELETE + INSERT. For long term tracking of the UPDATE issue please refer to GHI [[ #13500 | #13500 ]]. This revision also deletes a redundant operation wrt creating views in the same migration script. Jira: DB-7569 Test Plan: Jenkins: all tests 1. Run upgrade tests: ``` ./yb_build.sh --java-test 'org.yb.pgsql.TestYsqlUpgrade' ``` 2. Perform portal upgrades to latest master, as well as 2.19.X. Reviewers: jason, tverona, fizaa, myang Reviewed By: myang Subscribers: yql, smishra Differential Revision: https://phorge.dev.yugabyte.com/D27722
- Loading branch information