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

Remove ttl_automatic_column storage parameter #83133

Closed
ecwall opened this issue Jun 21, 2022 · 0 comments · Fixed by #83134
Closed

Remove ttl_automatic_column storage parameter #83133

ecwall opened this issue Jun 21, 2022 · 0 comments · Fixed by #83134
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@ecwall
Copy link
Contributor

ecwall commented Jun 21, 2022

The logic around ttl_automatic_column is a bit confusing and can be simplified to using ttl_expire_after to create and drop the crdb_internal_expiration column.

ttl_expire_after should be able to be used with or without ttl_expiration_expression to customize the logic.

Jira issue: CRDB-16878
Epic CRDB-14592

@ecwall ecwall added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Jun 21, 2022
@ecwall ecwall self-assigned this Jun 21, 2022
craig bot pushed a commit that referenced this issue Jul 6, 2022
83134: sql: remove `ttl_automatic_column` storage parameter r=otan a=ecwall

fixes #83133

Release note (sql change): Remove ttl_automatic_column storage param.
The crdb_internal_expiration column is created when ttl_expire_after is set and
removed when ttl_expire_after is reset.

83615: sql: don't clear the memory account of the prepared stmt r=yuzefovich a=yuzefovich

Previously, we had a bug of clearing the memory account of the prepared
statements right after that prepared statement is created although we do
keep the struct around. I believe this bug was introduced long time ago,
and it could result in some memory not being accounted for. This is now
fixed.

Partially addresses: #72581.

Release note: None

Co-authored-by: Evan Wall <[email protected]>
Co-authored-by: Yahor Yuzefovich <[email protected]>
@craig craig bot closed this as completed in 965f7c6 Jul 6, 2022
craig bot pushed a commit that referenced this issue Jul 7, 2022
83908: Update row level TTL RFC r=otan a=ecwall

Remove usages of unused ttl_automatic_column.

refs #83133
refs #83134

Release note: None

Co-authored-by: Evan Wall <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant