Database settings
The Settings panel on a database page holds per-database overrides. Values you have not changed follow the server defaults from the configuration.
Plan capture
Section titled “Plan capture”| Setting | Range | Server default | Environment variable |
|---|---|---|---|
| Automatic plan capture | on / off | on | QUERYPILOT_PLAN_CAPTURE_ENABLED |
| Capture interval (minutes) | 5–1440 | 10 | QUERYPILOT_PLAN_CAPTURE_INTERVAL_MINUTES |
| Queries per round | 1–100 | 20 | QUERYPILOT_PLAN_CAPTURE_MAX_QUERIES |
Save is enabled only when something changed and every value is valid; only changed fields are sent. Discard changes restores the saved values.
If the database cannot support capture (PostgreSQL older than 16, or pg_stat_statements not
readable), the panel says why and the controls are disabled.
How changes reach agents
Section titled “How changes reach agents”- Only the keys you change are stored. Changing a server default later still reaches every database that has not overridden that key.
- Each save increments a settings version in the database, so concurrent edits never share a version.
- Agents receive the resolved settings and version on every heartbeat (every 30 seconds by default) and apply a newer version without a restart. Turning capture on starts it on the next round.
- Every change is recorded in the audit trail.
GET /api/v1/databases/{id}/settingsPATCH /api/v1/databases/{id}/settingsContent-Type: application/json
{ "planCapture": { "enabled": true, "intervalMinutes": 30, "maxQueries": 10 } }The response contains the resolved planCapture values, planCaptureSupported,
planCaptureUnsupportedReason and updatedAt.