Skip to content

docs: add EXPIRE ROWS materialized-view documentation#468

Open
nwoolmer wants to merge 2 commits into
mainfrom
nw_expire_rows
Open

docs: add EXPIRE ROWS materialized-view documentation#468
nwoolmer wants to merge 2 commits into
mainfrom
nw_expire_rows

Conversation

@nwoolmer

Copy link
Copy Markdown
Contributor

Deep-dive concept page (concepts/deep-dive/expire-rows.md) for passthrough materialized views with EXPIRE ROWS: all modes, worked examples, read-filter/cleanup mechanics, NULL/ties/monotonicity semantics, and limitations. Adds an ALTER MATERIALIZED VIEW SET EXPIRE reference page, an EXPIRE ROWS section in CREATE MATERIALIZED VIEW, and sidebar entries.

Deep-dive concept page (concepts/deep-dive/expire-rows.md) for passthrough materialized views with EXPIRE ROWS: all modes, worked examples, read-filter/cleanup mechanics, NULL/ties/monotonicity semantics, and limitations. Adds an ALTER MATERIALIZED VIEW SET EXPIRE reference page, an EXPIRE ROWS section in CREATE MATERIALIZED VIEW, and sidebar entries.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nwoolmer nwoolmer added documentation Improvements or additions to documentation DO NOT MERGE labels Jun 15, 2026
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

🚀 Build success!

Latest successful preview: https://preview-468--questdb-documentation.netlify.app/docs/

Commit SHA: 3fd5d8d

📦 Build generates a preview & updates link on each commit.

Corrections and additions ported from the core repo's in-repo
design doc (docs/row-expiry.md, now removed there):

- Aggregating views are ACCEPTED with a logged advisory, not
  rejected (the previously-cited error message does not exist);
  reworded the concept note, Requirements, the ALTER behavior and
  errors tables, and the CREATE section accordingly.
- materialized_views() exposes the policy as expire_clause, not
  expire_predicate.
- Monotonicity: list the exact clock shapes the cleanup job proves
  monotonic (bare clock, clock minus non-negative constant,
  fixed-unit look-back dateadd) and that calendar units,
  look-forward offsets, compound arithmetic, and window predicates
  skip cleanup; the job skips rather than risks deleting rows.
- No-policied-chains rule: CREATE rejects a defining query reading a
  policied view (base or join); SET EXPIRE is rejected with
  dependent views; corresponding errors added to the ALTER page.
- Reserved __qdb_re_keep column name; no line comments inside the
  clause; CLEANUP EVERY strict <number><unit> grammar (s/m/h/d/w).
- Kill switch is read at startup (restart required); failing sweeps
  back off from 1s up to a 10-minute cap.
- Parquet side effect: compacting a partially-expired Parquet
  partition rewrites it as native storage until re-conversion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants