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

sql: permit creation and refreshing of materialized views as of system time #56167

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 30, 2020

  1. sql: add support for CTAS AS OF SYSTEM TIME

    Previously, running a statement of the form
    
        CREATE TABLE t AS SELECT ... FROM ... AS OF SYSTEM TIME x
    
    was not supported.
    
    Now, it is supported. The semantics are that the table creation happens
    at the transaction timestamp, but the backfill that's performed to fetch
    the data from the `SELECT` is performed at the user-specified timestamp
    x.
    
    This is useful for copying data from tables that are experiencing write
    traffic. Reading the contended table's data at a historical timestamp
    avoids contention on the CREATE TABLE AS.
    
    Release note (sql change): CREATE TABLE AS SELECT ... FROM ... AS OF
    SYSTEM TIME x is now supported.
    jordanlewis committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    3488fe0 View commit details
    Browse the repository at this point in the history
  2. sql: wip: add AOST capabilities to MATVIEWS

    Add the ability to CREATE and REFRESH MATERIALIZED VIEWS, AS OF SYSTEM
    TIME. The purpose of this is to allow the expensive backfill operations
    to happen at a timestamp in the past to avoid contention.
    
    Currently, this is a little bit broken, because schema changes of the
    backing tables of the views can wreak havoc when performed at different
    system times.
    
    Release note (sql change): add AOST capabilities to materialized views.
    jordanlewis committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    9f06478 View commit details
    Browse the repository at this point in the history