-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Document MV GRACE PERIOD clause #15810
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
Conversation
| should be used for querying. If time elapsed since last materialized view refresh | ||
| is greater than the grace period, the materialized view acts as a normal view and | ||
| materialized data is not used. If not specified, the grace period defaults to | ||
| infinity. See :doc:`refresh-materialized-view` for more about refreshing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re "defaults to infinity". We should clarify what that means in practice. Something like that:
As a result a materialized by default therefore without the specified grace period always uses the materialized data from the last refresh and never falls back to act like a view and retrieve the current data from the source tables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out.
You worded it very precisely. I am afraid some users may not understand. The sentence feels pretty long. Would it be possible to reword it or split?
Ideally, can you please make it a suggestion, or somehow else indicate which piece of text you would want to have replaced with the new sentence(s)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah .. I was struggling putting something together.
How about this? After "inifinity." insert this:
The default behavior therefore is that the queries accessing the materialized view always access the data from the most recent refresh and the materialized view storage tables. The query processing never falls back to process the materialized view access like a view and retrieve the current data from the source tables. This only occurs if a grace period is specified.
I know this is long but I feel like this is the only way to truly explain what is and is not happening. Maybe @colebow can chime in and refine my wording some more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@findepi did you forget to pull the above suggestion in?
|
Also .. related question .. I am not 100% sure so could you clarify / confirm .. is this a breaking change for MVs that are already defined? |
|
@mosabua see #15326 and #15326 (comment) in particular. |
Co-authored-by: Manfred Moser <[email protected]>
Co-authored-by: Manfred Moser <[email protected]>
Co-authored-by: Manfred Moser <[email protected]>
Only the syntax, so the breakage didn't happen yet. However, I am not prepared to discuss breaking changes mitigations on a docs PR. |
Sounds good. |
colebow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Doc changes for changes added in #15104
Per #15326 issue.