chore(observe): drop dead pg_stat_activity scrape path#599
Merged
Conversation
The postgres_query()-based pg_stat_activity scrape added in #598 silently no-ops in our DuckDB build and never populates the duckgres_ducklake_metadata_connections gauge. Remove it (and the gauge) rather than leave dead code that masks a real "no data" signal. Aurora-side connection / query activity is already attributable to duckgres via the application_name we tag at ATTACH time, so Performance Insights and pg_stat_activity are the better tools for that view — no worker-side scrape needed. Keeps the pg_pool_max_connections probe via duckdb_settings(), which works, and the per-query postgres_scan_seconds histogram and postgres_scan_ms query_log column from #598.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up cleanup after #598. The
postgres_query()-basedpg_stat_activityscrape silently no-ops in our DuckDB build, leavingduckgres_ducklake_metadata_connectionsempty in dev and never reporting any data. Dead code is worse than no code here: it gives the misleading impression that "no data" means "no connections", instead of "this never worked".Removed:
scrapeMetadataConnectionsByStateand itspostgres_querycall induckdbservice/service.goMetadataConnectionsByStategauge inserver/observe/metrics.goKept (works, confirmed wired):
duckgres_ducklake_metadata_pool_max_connectionsgauge — scraped viaduckdb_settings(), which is universally available.duckgres_postgres_scan_seconds{org}histogram andduckdb.postgres_scan_thread_sspan attribute (per-query metadata DB time).system.query_log.postgres_scan_mscolumn —QueryLoggeris a real, wired feature (configstore singleton incontrolplane/configstore/models.go:287, CLI flag, admin API, plumbed throughcmd/duckgres-worker/main.go:214); the column just sits idle in deployments whereQueryLog.Enabled=falseand lights up automatically when the feature is flipped on.application_name=duckgres/<org-id>injection — Aurora-sidepg_stat_activity/ Performance Insights are the better tool for live connection state anyway.Test plan
go build ./...go vet ./...go test ./duckdbservice/ ./server/observe/