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
feat: run_analytical_query — long-running reads on an isolated pool (#283)
Adds run_analytical_query — a read-only SELECT for genuine analytical work
(large aggregations / joins / window functions) that runs on a DEDICATED
connection pool isolated from the main 5-slot pool, so a long query can't
starve the fast-path tools. Reuses the same pglast allowlist + TenantSqlDriver
(SET LOCAL ROLE / RLS) + read-only transaction as run_select, with an elevated,
bounded timeout: the isolated pool size is the concurrency cap, a per-call
timeout_ms (clamped to the max) is the client budget, and the pool's
statement_timeout is the PG ceiling. A run_select timeout points the agent at
the tool.
Boot-time knobs: MCPG_ENABLE_ANALYTICAL_QUERIES (default true; gates the READ
tool), MCPG_ANALYTICAL_TIMEOUT_MS (120000), MCPG_ANALYTICAL_MAX_TIMEOUT_MS
(600000), MCPG_ANALYTICAL_MAX_CONCURRENCY (2). Primary DB only for now; the
runner is built only in production (mock-DB tests don't spin a real pool).
Surface 253 -> 254; snapshots + doc tables regenerated; test_analytical.py added.
Full unit+contract suite (2859) + mypy/ruff clean.
N/A — reactive capability from the statement-timeout-ceiling analysis.
Copy file name to clipboardExpand all lines: docs/plans/pg19-readiness.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ that accidentally deletes a tool fails CI.
44
44
|---|---|---|
45
45
| 1. CI matrix + compatibility surface | ✅ **Shipped**| PG 19 beta runs as an experimental (`continue-on-error`) matrix entry; pgvector built from source via `.github/ci-postgres-pg19.Dockerfile`. A WarehousePG (MPP) characterisation lane landed alongside. PostGIS still deferred until an apt package is published. |
46
46
| 2. Feature audit | ✅ **Done**| The Beta 1 sweep below is complete — every domain triaged through the product-owner lens. |
47
-
| 3. Incremental landing | ⏳ **Largely shipped**| Many tool families have landed: SQL/PGQ property graphs (`run_pgq`, `create_property_graph`, …), in-server `REPACK` (`repack_table`), skip-scan advisor (`recommend_skip_scan_indexes`), `WAIT FOR LSN` read-your-writes (`wait_for_lsn`), online data-checksum + on-demand logical-replication toggles, DDL introspection (`get_role_ddl` / `get_database_ddl` / `get_tablespace_ddl` / `validate_check_constraint`), partition `MERGE` / `SPLIT`, lock + recovery stats, and async-I/O coverage. See the [tool index](../tools.md#tool-index-253-tools) for the shipped surface and [feature-shortlist.md](../feature-shortlist.md) for the remaining items (tracked to GA). |
47
+
| 3. Incremental landing | ⏳ **Largely shipped**| Many tool families have landed: SQL/PGQ property graphs (`run_pgq`, `create_property_graph`, …), in-server `REPACK` (`repack_table`), skip-scan advisor (`recommend_skip_scan_indexes`), `WAIT FOR LSN` read-your-writes (`wait_for_lsn`), online data-checksum + on-demand logical-replication toggles, DDL introspection (`get_role_ddl` / `get_database_ddl` / `get_tablespace_ddl` / `validate_check_constraint`), partition `MERGE` / `SPLIT`, lock + recovery stats, and async-I/O coverage. See the [tool index](../tools.md#tool-index-254-tools) for the shipped surface and [feature-shortlist.md](../feature-shortlist.md) for the remaining items (tracked to GA). |
0 commit comments