Daily research
Evidence collection

pg_stat_statements as a Trust Boundary

Why QueryRook treats pg_stat_statements as a safer first evidence source than raw query logs or copied application data.

/Field note/Slow Query Analysis

Security-conscious teams adopting Postgres workload analysis

Research question

Can a Postgres optimization system produce useful first-pass recommendations without copying raw application data? pg_stat_statements is the first place to test that boundary.

Method

Collect only normalized fingerprints and aggregate counters, then require a separate approval step before using richer schema or plan context in AI-assisted analysis.

Operator use

The product should explain the evidence boundary in plain language: workload statistics and query shapes are inspected; table contents are not part of normal onboarding.