Skip to content

revert: keep pushing non-DML statements (reverts #179)#180

Merged
veksen merged 1 commit into
mainfrom
revert-non-dml-push-filter
Jul 15, 2026
Merged

revert: keep pushing non-DML statements (reverts #179)#180
veksen merged 1 commit into
mainfrom
revert-non-dml-push-filter

Conversation

@veksen

@veksen veksen commented Jul 15, 2026

Copy link
Copy Markdown
Member

Reverts #179 (80af5fb).

Goal

Stop dropping non-DML events at the capture layer. #179 quieted the migration-day alert spam (Query-Doctor/Site#3578) by filtering statementType === "other" at both push sites, so CREATE/DROP/ALTER/COPY/VACUUM never left the analyzer. That fixes the noise but discards the events before QD ever ingests them — which permanently removes downstream optionality: an index dropped in prod, a schema-changing migration, correlating a later CI regression against a schema change, an MCP "recent events" feed. None of that is possible once the event is dropped at capture.

Suppressing the alert does not require dropping the data. That's an alerting-layer decision (scope + cadence), so ingestion should stay complete and the noise handled where alerts are decided — tracked in Query-Doctor/Site#3581.

What

  • Before (on main): only DML is pushed; DDL/COPY/VACUUM are filtered out and never reach the catalog or the dashboard.
  • After (this PR): every statement sampled from pg_stat_statements is pushed again, restoring the pre-fix: skip non-DML statements when pushing queries #179 behavior.

Accepted trade-off: the migration-day alert spam returns until the alerting-side handling lands. That's deliberate — the fix belongs there, not here.

How

Plain git revert of the squash commit. Restores the two push sites in src/remote/api-client.ts to push unconditionally and drops the statementType instance field re-added to RecentQuery.

Tests

npm run typecheck clean; full suite passes (306/306 — the 4 removed cases are the assertions #179 added for the dropped filter; one Docker-teardown flake under the parallel run passes 3/3 in isolation).

This reverts commit 80af5fb (#179).

#179 stopped the migration-day alert spam by dropping statementType
=== "other" at both push sites, so DDL, COPY and VACUUM never left the
analyzer. It quiets the noise, but by discarding the events at capture:
QD never ingests them, so nothing downstream can use them — an index
dropped in prod, a schema-changing migration, correlating a later CI
regression against a schema change, an MCP "recent events" feed. None of
that is possible once the event is dropped before it reaches the catalog.

Suppressing the alert does not require dropping the data at capture. That
is an alerting-layer decision (scope and cadence), so ingestion should
stay complete. This restores full ingestion; the migration-day alert
spam returns until the alerting-side handling lands (Query-Doctor/Site#3581).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query Doctor Analysis

3 queries analyzed

0 regressed · 0 improved · 0 new · 0 removed

2 pre-existing issues

Using assumed statistics (10000000 rows/table). For better results, sync production stats.

More detail → get_ci_run({ runId: "019f663e-626c-7ea4-80c5-b2807f166dda" }) · view run · docs

@veksen veksen merged commit f7a9e0f into main Jul 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant