-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[YSQL] REFRESH MV [NONCONCURRENTLY] crashes during major version upgrade #26297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
2024.2 Backport Required
2024.2.2.1_blocker
area/ysql
Yugabyte SQL (YSQL)
kind/bug
This issue is a bug
priority/medium
Medium priority issue
Comments
karthik-ramanathan-3006
added a commit
that referenced
this issue
Mar 6, 2025
…g major version upgrade Summary: D42159 handling the generation of PostgreSQL XIDs for `REFRESH MATERIALIZED VIEW CONCURRENTLY`. It did not handle scenarios where a nonconcurrent refresh silently uses temp tables. D41504 introduced one such scenario: when a major version upgrade is in progress, a `REFRESH MATERIALIZED VIEW [NONCONCURRENTLY]` uses temporary tables to handle new data to be inserted into the materialized view. This revision handles the above scenario by treating it the same as a concurrent refresh with respect to clearing the XID on transaction commit. Jira: DB-15640 Test Plan: Run the following test: ``` ./yb_build.sh --cxx-test integration-tests_ysql_major_upgrade_matview-test --gtest_filter YsqlMajorUpgradeMatviewTest ``` Jenkins: urgent Reviewers: fizaa, hsunder Reviewed By: fizaa, hsunder Subscribers: smishra, yql Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D42332
karthik-ramanathan-3006
added a commit
that referenced
this issue
Mar 6, 2025
…NCURRENTLY] during major version upgrade Summary: D42159 handling the generation of PostgreSQL XIDs for `REFRESH MATERIALIZED VIEW CONCURRENTLY`. It did not handle scenarios where a nonconcurrent refresh silently uses temp tables. D41504 introduced one such scenario: when a major version upgrade is in progress, a `REFRESH MATERIALIZED VIEW [NONCONCURRENTLY]` uses temporary tables to handle new data to be inserted into the materialized view. This revision handles the above scenario by treating it the same as a concurrent refresh with respect to clearing the XID on transaction commit. Jira: DB-15640 Original commit: dbeec7c / D42332 Test Plan: Run the following test: ``` ./yb_build.sh --cxx-test integration-tests_ysql_major_upgrade_matview-test --gtest_filter YsqlMajorUpgradeMatviewTest ``` Jenkins: urgent Reviewers: fizaa, hsunder Reviewed By: fizaa Subscribers: yql, smishra Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D42355
karthik-ramanathan-3006
added a commit
that referenced
this issue
Mar 6, 2025
…CONCURRENTLY] during major version upgrade Summary: D42159 handling the generation of PostgreSQL XIDs for `REFRESH MATERIALIZED VIEW CONCURRENTLY`. It did not handle scenarios where a nonconcurrent refresh silently uses temp tables. D41504 introduced one such scenario: when a major version upgrade is in progress, a `REFRESH MATERIALIZED VIEW [NONCONCURRENTLY]` uses temporary tables to handle new data to be inserted into the materialized view. This revision handles the above scenario by treating it the same as a concurrent refresh with respect to clearing the XID on transaction commit. Jira: DB-15640 Original commit: dbeec7c / D42332 Test Plan: Run the following test: ``` ./yb_build.sh --cxx-test integration-tests_ysql_major_upgrade_matview-test --gtest_filter YsqlMajorUpgradeMatviewTest ``` Jenkins: urgent Reviewers: fizaa, hsunder Reviewed By: fizaa Subscribers: smishra, yql Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D42356
utkarsh-um
pushed a commit
to utkarsh-um/yugabyte-db
that referenced
this issue
Mar 17, 2025
…Y] during major version upgrade Summary: D42159 handling the generation of PostgreSQL XIDs for `REFRESH MATERIALIZED VIEW CONCURRENTLY`. It did not handle scenarios where a nonconcurrent refresh silently uses temp tables. D41504 introduced one such scenario: when a major version upgrade is in progress, a `REFRESH MATERIALIZED VIEW [NONCONCURRENTLY]` uses temporary tables to handle new data to be inserted into the materialized view. This revision handles the above scenario by treating it the same as a concurrent refresh with respect to clearing the XID on transaction commit. Jira: DB-15640 Test Plan: Run the following test: ``` ./yb_build.sh --cxx-test integration-tests_ysql_major_upgrade_matview-test --gtest_filter YsqlMajorUpgradeMatviewTest ``` Jenkins: urgent Reviewers: fizaa, hsunder Reviewed By: fizaa, hsunder Subscribers: smishra, yql Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D42332
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2024.2 Backport Required
2024.2.2.1_blocker
area/ysql
Yugabyte SQL (YSQL)
kind/bug
This issue is a bug
priority/medium
Medium priority issue
Jira Link: DB-15640
Description
0ff1f71 fixed handling XIDs during
REFRESH MATERIALIZED VIEW CONCURRENTLY
. However, it causesREFRESH MATERIALIZED VIEW
to crash in nonconcurrent mode during major version upgrades as evidenced by test:Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information
The text was updated successfully, but these errors were encountered: