Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(coderd/database/dbpurge): add retention for connection logs#21022

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mafredri wants to merge4 commits intomafredri/feat-coderd-db-retention-policy
base:mafredri/feat-coderd-db-retention-policy
Choose a base branch
Loading
frommafredri/feat-coderd-db-retention-policy-2

Conversation

@mafredri
Copy link
Member

@mafredrimafredri commentedDec 1, 2025
edited
Loading

AddDeleteOldConnectionLogs query and integrate it into thedbpurge
routine. Retention is controlled by--retention-connection-logs flag,
falling back to--retention-global when not set. Disabled (0) by
default.

Depends on#21021
Updates#20743


PR Stack

PRTitle
#21021feat(coderd): add retention policy configuration
👉#21022feat(coderd/database/dbpurge): add retention for connection logs
#21025feat(coderd/database/dbpurge): add retention for audit logs
#21037feat(coderd/database/dbpurge): make API keys retention configurable
#21038docs: add data retention documentation
#21039feat: add retention config forworkspace_agent_logs

@mafredrimafredriforce-pushed themafredri/feat-coderd-db-retention-policy-2 branch fromc067a63 to661866dCompareDecember 1, 2025 13:31
@mafredrimafredri changed the titlefeat(dbpurge): add configurable retention for connection logsfeat(coderd/database/dbpurge): add retention for connection logsDec 1, 2025
@mafredrimafredriforce-pushed themafredri/feat-coderd-db-retention-policy-2 branch 2 times, most recently fromb8a4bdb to0fb3b51CompareDecember 1, 2025 14:40
@mafredrimafredriforce-pushed themafredri/feat-coderd-db-retention-policy-2 branch from724b589 to782f1f7CompareDecember 1, 2025 17:00
@mafredrimafredri marked this pull request as ready for reviewDecember 1, 2025 18:17
Copy link
Member

@ethanndicksonethanndickson left a comment
edited
Loading

Choose a reason for hiding this comment

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

nice! I'm glad we're doing this.

mafredri reacted with hooray emoji
@mafredrimafredriforce-pushed themafredri/feat-coderd-db-retention-policy branch fromb34ee61 tod5062e2CompareDecember 2, 2025 09:48
Add `DeleteOldConnectionLogs` query and integrate it into the `dbpurge`routine. Retention is controlled by `--retention-connection-logs` flag,falling back to `--retention-global` when not set. Disabled (0) bydefault.Depends on#21021Updates#20743
Connection logs retention is now explicit - it's enabled when--connection-logs-retention is set to a non-zero duration, anddisabled when set to 0. No fallback to global retention.
@mafredrimafredriforce-pushed themafredri/feat-coderd-db-retention-policy-2 branch from782f1f7 to039afdbCompareDecember 2, 2025 09:59
Use :execrows instead of :one to simplify the query by removing theextra CTE wrapper. This lets PostgreSQL return the row count directlyvia RowsAffected() instead of requiring an explicit COUNT(*) scan.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ethanndicksonethanndicksonethanndickson approved these changes

@mtojekmtojekAwaiting requested review from mtojek

Assignees

@mafredrimafredri

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@mafredri@ethanndickson

[8]ページ先頭

©2009-2025 Movatter.jp