ALTER MATERIALIZED VIEW RESUME WAL

info

Materialized View support is in beta.

It may not be fit for production use.

To enable beta materialized views, set cairo.mat.view.enabled=true in server.conf, or export the equivalent environment variable: QDB_CAIRO_MAT_VIEW_ENABLED=true.

Please let us know if you run into issues.

Either:

  1. Email us at support@questdb.io
  2. Join our public Slack
  3. Post on our Discourse community

ALTER MATERIALIZED VIEW RESUME WAL restarts WAL table transactions after resolving errors.

Accepts the same optional sequencerTxn input as the ALTER TABLE RESUME WAL operation. Refer to that page for more details.

Syntax

Flow chart showing the syntax of the ALTER MATERIALIZED VIEW keyword

Flow chart showing the syntax of ALTER MATERIALIZED VIEW with RESUME WAL keyword

Example

Use the wal_tables() function to investigate the materialized view status:

List all tables and materialized viewsDemo this query
wal_tables();
namesuspendedwriterTxnsequencerTxn
trades_1htrue35

The trades_1h view is suspended. The last successful commit is 3.

The following query restarts transactions from the failed transaction, 4:

ALTER MATERIALIZED VIEW trades_1h RESUME WAL;

See also

For more information on the concept, see the reference on materialized views.