Skip to content

Conversation

@jstirnaman
Copy link
Contributor

@jstirnaman jstirnaman commented Dec 4, 2025

Summary

  • Fix clause order: FUTURE LIMIT must appear before PAST LIMIT (parser requirement)
  • Add FUTURE LIMIT and PAST LIMIT clauses to ALTER RETENTION POLICY syntax documentation
  • Add grammar definitions for retention_future_limit and retention_past_limit
  • Add explicit note clarifying the required clause order
  • Clean up InfluxQL spec formatting (separate commit)

Files changed

Retention policy fixes

  • content/influxdb/v1/query_language/manage-database.md
  • content/enterprise_influxdb/v1/query_language/manage-database.md
  • content/influxdb/v1/query_language/spec.md
  • content/enterprise_influxdb/v1/query_language/spec.md

Test plan

  • Hugo build passes
  • Review rendered pages for correct syntax display

closes #6590

…d add to ALTER RETENTION POLICY

- Fix clause order: FUTURE LIMIT must appear before PAST LIMIT (parser requirement)
- Add FUTURE LIMIT and PAST LIMIT clauses to ALTER RETENTION POLICY syntax
- Add grammar definitions for retention_future_limit and retention_past_limit
- Add explicit note clarifying the required clause order
- Fix "There are" style issue in spec.md

closes #6590
influxdb/v1:
- Simplify introduction and use relative anchor links
- Convert notes to GitHub-style callout syntax
- Fix heading hierarchy (Letters/digits, Identifiers, Keywords, Literals as h3)
- Standardize Duration units table heading
- Fix "keywords" typo
- Reword "See FAQ" to "For more information, see"
- Simplify KILL QUERY section
- Fix SHOW MEASUREMENT CARDINALITY heading level
- Replace "There are" with active voice

enterprise_influxdb/v1:
- Add related links to frontmatter
- Simplify introduction and use relative anchor links
- Convert notes to GitHub-style callout syntax
- Add Characters and Letters/digits to TOC
- Standardize Duration units table heading
- Fix "keywords" typo
- Reword "See FAQ" to "For more information, see"
- Simplify KILL QUERY section for Enterprise clusters
- Update SHOW TAG KEYS grammar to include with_key_clause
- Remove backticks from SHOW STATS headings
show_stats_stmt = "SHOW STATS [ FOR '<component>' | 'indexes' ]"
```

#### `SHOW STATS`
Copy link
Contributor Author

@jstirnaman jstirnaman Dec 4, 2025

Choose a reason for hiding this comment

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

Duplicate heading. I rearranged the content to be consistent with Ent.

- A multi-line comment begins with `/*` and ends with `*/`. This comment type can span several lines.
Multi-line comments do not support nested multi-line comments.

## Query Engine Internals
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you're looking for this in Ent., it has a separate Internals page.

Copy link

@davidby-influx davidby-influx left a comment

Choose a reason for hiding this comment

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

Unfortunately, we have discovered a bug in ALTER RETENTION POLICY so, although it accepts FUTURE LIMIT and PAST LIMIT it does not persist them correctly.

So, let me rescind my request to add the syntax to the documentation for 1.12.2, and we can add it on the 1.12.3 release.

For 1.12.2, we could add a note that they are, in fact, not changeable. I hope to have this fixed by 1.12.3.

Sorry for my confusion.

### Modify retention policies with ALTER RETENTION POLICY

The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, or `DEFAULT`:
The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, `FUTURE LIMIT`, `PAST LIMIT`, or `DEFAULT`:

Choose a reason for hiding this comment

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

Let's revert this change to keep customers from using limits in ALTER statements

The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, `FUTURE LIMIT`, `PAST LIMIT`, or `DEFAULT`:
```sql
ALTER RETENTION POLICY <retention_policy_name> ON <database_name> [DURATION <duration>] [REPLICATION <n>] [SHARD DURATION <duration>] [DEFAULT]
ALTER RETENTION POLICY <retention_policy_name> ON <database_name> [DURATION <duration>] [REPLICATION <n>] [SHARD DURATION <duration>] [FUTURE LIMIT <duration>] [PAST LIMIT <duration>] [DEFAULT]

Choose a reason for hiding this comment

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

Please revert, as noted above. Perhaps we want to add a note that limits are not changeable (which note we can then remove in 1.12.3).

{{% /warn %}}

For information about the `FUTURE LIMIT` and `PAST LIMIT` clauses, see
[CREATE RETENTION POLICY](#create-retention-policies-with-create-retention-policy).

Choose a reason for hiding this comment

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

Remove for 1.12.2

retention_policy_option
[ retention_policy_option ]
[ retention_policy_option ]
[ retention_policy_option ]

Choose a reason for hiding this comment

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

Remove for 1.12.2

ALTER RETENTION POLICY "policy1" ON "somedb" DURATION 1h REPLICATION 4

-- Change future and past limits.
ALTER RETENTION POLICY "policy1" ON "somedb" FUTURE LIMIT 6h PAST LIMIT 6h

Choose a reason for hiding this comment

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

Remove for 1.12.2

### Modify retention policies with ALTER RETENTION POLICY

The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, or `DEFAULT`:
The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, `FUTURE LIMIT`, `PAST LIMIT`, or `DEFAULT`:

Choose a reason for hiding this comment

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

Revert for 1.12.2

The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, `FUTURE LIMIT`, `PAST LIMIT`, or `DEFAULT`:
```sql
ALTER RETENTION POLICY <retention_policy_name> ON <database_name> [DURATION <duration>] [REPLICATION <n>] [SHARD DURATION <duration>] [DEFAULT]
ALTER RETENTION POLICY <retention_policy_name> ON <database_name> [DURATION <duration>] [REPLICATION <n>] [SHARD DURATION <duration>] [FUTURE LIMIT <duration>] [PAST LIMIT <duration>] [DEFAULT]

Choose a reason for hiding this comment

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

Revert for 1.12.2

retention_policy_option
[ retention_policy_option ]
[ retention_policy_option ]
[ retention_policy_option ]

Choose a reason for hiding this comment

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

Remove for 1.12.2

ALTER RETENTION POLICY "policy1" ON "somedb" DURATION 1h REPLICATION 4

-- Change future and past limits.
ALTER RETENTION POLICY "policy1" ON "somedb" FUTURE LIMIT 6h PAST LIMIT 6h

Choose a reason for hiding this comment

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

Remove for 1.12.2

Tables can now be renamed and undeleted with [influxctl v2.10.5](https://docs.influxdata.com/influxdb3/clustered/reference/release-notes/influxctl/#2105) or later.
To enable hard delete of soft-deleted namespaces:
To enable hard delete of soft-deleted databases:

Choose a reason for hiding this comment

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

I don't know anything about this.

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

Labels

hold off Should not be merged or address yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CREATE RETENTION and ALTER RETENTION for V1 have errors around LIMIT clauses

4 participants