You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/admin/security/audit-logs.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,6 +151,36 @@ Should you wish to purge these records, it is safe to do so. This can only be do
151
151
directly against the`audit_logs` table in the database. We advise users to only purge old records (>1yr)
152
152
and in accordance with your compliance requirements.
153
153
154
+
###Maintenance Procedures for the Audit Logs Table
155
+
156
+
>[!NOTE]
157
+
>`VACUUM FULL` acquires an exclusive lock on the table, blocking all reads and writes. For more information, see the[PostgreSQL VACUUM documentation](https://www.postgresql.org/docs/current/sql-vacuum.html).
158
+
159
+
You may choose to run a`VACUUM` or`VACUUM FULL` operation on the audit logs table to reclaim disk space. If you choose to run the`FULL` operation, consider the following when doing so:
160
+
161
+
-**Run during a planned mainteance window** to ensure ample time for the operation to complete and minimize impact to users
162
+
-**Stop all running instances of`coderd`** to prevent connection errors while the table is locked. The actual steps for this will depend on your particular deployment setup. For example, if your`coderd` deployment is running on Kubernetes: