Skip to content

GH-1: Add hypopg and load pg_stat_statements at startup - #4

Merged
tormi merged 1 commit into
mainfrom
GH-1-hypopg_pg_stat_statements
Oct 18, 2026
Merged

tormi merged 1 commit into
mainfrom
GH-1-hypopg_pg_stat_statements

Conversation

@tormi

@tormi tormi commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #1

Changes

Features

Testing

  • Built the image locally (Arm) and ran the workflow's check: all extensions created (hypopg 1.4.3, pg_stat_statements 1.12), hypopg_create_index returned a hypothetical index, and pg_stat_statements answered a query.
  • Postgres MCP Pro in restricted mode against a database on the new image:
    • analyze_query_indexes recommended a btree index for a test query (estimated cost 4228 → 8.1);
    • get_top_queries listed queries from pg_stat_statements.

Note for projects using the image: one that sets its own command or shared_preload_libraries replaces the new default and needs pg_stat_statements in its own list.

🤖 Generated with Claude Code

- Install postgresql-18-hypopg, for hypothetical indexes
- Load pg_stat_statements at startup (shared_preload_libraries), so a database can create it and query its statistics
- Check both in the publish workflow: a hypothetical index, and a query on pg_stat_statements, which fails unless it's preloaded
- List both in the README, with the note for projects that set their own shared_preload_libraries

Refs: Dockerfile, .github/workflows/publish.yml, README.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tormi
tormi merged commit ac0dc34 into main Oct 18, 2026
1 check passed
@tormi
tormi deleted the GH-1-hypopg_pg_stat_statements branch October 18, 2026 18:08
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.

Add hypopg and load pg_stat_statements, for index suggestions and query statistics

1 participant