Add support for pg_stat_statements configuration in Targets

This commit introduces a `use_pg_stat_statements` flag for targets, allowing users to enable or disable the use of `pg_stat_statements` for query insights. It includes database schema changes, backend logic, and UI updates to manage this setting in both creation and editing workflows.
This commit is contained in:
2026-02-12 13:39:57 +01:00
parent 839943d9fd
commit 712bec3fea
8 changed files with 215 additions and 15 deletions

View File

@@ -9,6 +9,7 @@ class TargetBase(BaseModel):
dbname: str
username: str
sslmode: str = "prefer"
use_pg_stat_statements: bool = True
tags: dict = Field(default_factory=dict)
@@ -33,6 +34,7 @@ class TargetUpdate(BaseModel):
username: str | None = None
password: str | None = None
sslmode: str | None = None
use_pg_stat_statements: bool | None = None
tags: dict | None = None