Skip to content

Add storage policy documentation#414

Open
glasstiger wants to merge 16 commits intomainfrom
ia_auto_parquet
Open

Add storage policy documentation#414
glasstiger wants to merge 16 commits intomainfrom
ia_auto_parquet

Conversation

@glasstiger
Copy link
Copy Markdown
Contributor

@glasstiger glasstiger commented Apr 10, 2026

Summary

  • Add new Storage Policy concept page (concepts/storage-policy.md) documenting the Enterprise feature for automated partition lifecycle management (convert to Parquet, drop native, drop local, drop remote)
  • Add new ALTER TABLE SET STORAGE POLICY SQL reference page (query/sql/alter-table-set-storage-policy.md) with full syntax, constraints, permissions, and examples
  • Add STORAGE POLICY clause documentation to the CREATE TABLE reference page
  • Update data-retention.md to list storage policies as a third retention approach alongside TTL and manual DROP PARTITION
  • Update storage-engine.md to reference storage policies for automatic Parquet conversion (replacing the previous object storage mention)
  • Add cross-reference from TTL concept page to the new storage policy docs
  • Register both new pages in sidebars.js

Test plan

  • Verify yarn build succeeds with no broken links
  • Check sidebar navigation includes the new pages under Concepts and SQL Reference
  • Confirm cross-links between storage policy, TTL, data retention, and CREATE TABLE pages resolve correctly

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 10, 2026

🚀 Build success!

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

Commit SHA: 1df4a59

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

glasstiger and others added 11 commits April 10, 2026 12:29
Use human-readable time suffixes for config defaults instead of raw
microsecond values. Add note that time-suffixed values are accepted.
Add worker.affinity and worker.sleep.timeout to the config table.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread documentation/concepts/storage-policy.md Outdated
Copy link
Copy Markdown
Contributor

@javier javier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice docs, but I think we need to change a few things

Only the specified settings are changed. Omitted settings retain their current
values.

The same syntax applies to materialized views:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to provide so many details about materialized views. Maybe a link at the bottom for a see also, but not so many examples about materialized views in the alter table page


```questdb-sql
GRANT SET STORAGE POLICY ON trades TO analyst;
GRANT REMOVE STORAGE POLICY ON trades TO admin;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this correct? I thought with remove you had to use FROM?

The view's TTL is independent of the base table's TTL. See
[TTL documentation](/docs/concepts/ttl/) for details.

## Storage Policy
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The syntax at the top should show TTL or STORAGE POLICY. Now this is display only in the section, but not at the top syntax

@@ -277,6 +277,45 @@ Time units: `HOURS`, `DAYS`, `WEEKS`, `MONTHS`, `YEARS`
The view's TTL is independent of the base table's TTL. See
[TTL documentation](/docs/concepts/ttl/) for details.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to make a note that TTL is not supported anymore for enterprise and to use Storage Policy instead

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And that if you have a view with TTL and want to move to storage policy, you need to disable TTL before

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add this also to the errors section at the bottom of the page?

@@ -241,6 +241,49 @@ information on the behavior of this feature.

:::
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add STORAGE POLICY as an alternative to TTL in the syntax blocks at the top of the page. Now it is only in its own section.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to explain (as in create mat view) that TTL is not supported anymore in enterprise when creating a table.

[ALTER TABLE SET STORAGE POLICY](/docs/query/sql/alter-table-set-storage-policy/).

:::note

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block should be at the TTL section, not in this one

To modify a storage policy after creation, see
[ALTER MATERIALIZED VIEW SET STORAGE POLICY](/docs/query/sql/alter-mat-view-set-storage-policy/).

:::note
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block should be at the TTL section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants