Skip to content
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

fix: remove matviewgraph column from pg_matviews #16246

Merged
merged 2 commits into from
Apr 11, 2024
Merged

Conversation

fuyufjh
Copy link
Member

@fuyufjh fuyufjh commented Apr 11, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Resolve #16070

Motivation: One of our customer run into frontend OOM because they issue a select * from pg_matviews every 10 seconds, while no one realized the size of matviewgraph column is so big that can cause frontend nodes to OOM.

Complete a long-time TODO in code:

// Below are some columns that PostgreSQL doesn't have.
// TODO: these field is only exist in RW and used by cloud side, need to remove it and let
// cloud switch to use `rw_catalog.rw_relation_info`.

cc. @luotianchun As stated in the code above, please migrate to query rw_relation_info column fragments before v1.9 release.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@github-actions github-actions bot added the type/fix Bug fix label Apr 11, 2024
@kwannoel
Copy link
Contributor

kwannoel commented Apr 11, 2024

Fyi issue should be resolved in the cloud side already https://linear.app/risingwave-labs/issue/CLOUD-2548/trigger-matview-sync-workflow-ondemand#comment-08f8258d. After this PR, the cloud side changes should just involve changing the catalog we query from.

Cloud side fix, which decouples poll mv query and get mv dag query.
https://github.com/risingwavelabs/risingwave-cloud/pull/6909/files#r1560435901.

@luotianchun
Copy link
Contributor

luotianchun commented Apr 11, 2024

cc. @luotianchun As stated in the code above, please migrate to rw_relation_info before v1.9 release.

@Gogomoe cc

@fuyufjh fuyufjh requested a review from yezizp2012 April 11, 2024 05:28
@Gogomoe
Copy link
Contributor

Gogomoe commented Apr 11, 2024

One of our customer run into frontend OOM because they issue a select * from pg_matviews every 10 seconds

For this issue, the cloud has a fix that query matviewgraph column on-demand. In the ongoing cloud release, we only query matviewgraph when the user expands the graph on the portal. The cloud release will be rolled out to PROD next Monday. So the issue will be resolved soon.

If we deprecate this field, portal folks need to find a other way to render the graph, It will take a while.

@fuyufjh fuyufjh enabled auto-merge April 11, 2024 05:52
@fuyufjh fuyufjh added this pull request to the merge queue Apr 11, 2024
@yezizp2012
Copy link
Member

One of our customer run into frontend OOM because they issue a select * from pg_matviews every 10 seconds

For this issue, the cloud has a fix that query matviewgraph column on-demand. In the ongoing cloud release, we only query matviewgraph when the user expands the graph on the portal. The cloud release will be rolled out to PROD next Monday. So the issue will be resolved soon.

If we deprecate this field, portal folks need to find a other way to render the graph, It will take a while.

Can cloud switch to rw_relation_info firstly? I will open a PR to add a new one, after that cloud can use that instead.

@kwannoel kwannoel removed this pull request from the merge queue due to a manual request Apr 11, 2024
@kwannoel
Copy link
Contributor

kwannoel commented Apr 11, 2024

I think we should let cloud side migrate first to rw_relation_info first, before we deprecate matviewgraph field as per this PR.

@fuyufjh
Copy link
Member Author

fuyufjh commented Apr 11, 2024

I think we should let cloud side migrate first to rw_relation_info first, before we deprecate matviewgraph field as per this PR.

I think we should merge this first. They have sufficient time to complete this before v1.8 release. As long as this PR gets merged, they can know how to adapt to the new version.

@fuyufjh fuyufjh added this pull request to the merge queue Apr 11, 2024
Merged via the queue into main with commit 1cc84f7 Apr 11, 2024
29 of 30 checks passed
@fuyufjh fuyufjh deleted the eric/resolve_16070 branch April 11, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove matviewgraph from pg_catalog.pg_matviews
5 participants