hardbyte / hardbyte/postgresql-job-queue-benchmarking
Follow-up: expose pg_ash extension as opt-in once the image story is sorted
- Vorherrschende Sprache
- HTML
- Sterne
- 2
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Spun out of #pr-for-feat/pg-ash-wait-events.
The harness now does pg_ash-style wait-event sampling itself
(see \`bench_harness/wait_events.py\`), which is option **B** of the
A/B/C trade-off in the PR description: harness-side sampler against
the standard \`postgres:17.2-alpine\` image, no extension install.
This issue tracks option **A**: switching (or extending) the postgres
image to one that ships \`pg_cron\` + the \`pg_ash\` extension itself,
exposed via an opt-in \`--with-pg-ash-extension\` flag.
## Why it's a separate issue
- Today's harness-side sampler covers the data we need for the
cross-system comparison report. Histogram counts per phase are in
\`raw.csv\`, top-N events in \`summary.json\`, the
\`Wait-event breakdown — clean phase\` plot is in \`index.html\`.
- pg_ash inside Postgres adds compact ASH partitions (rolling
retention, time-series queries on an actual table) that are nice
for **post-bench exploration**, not for the report. That's a
separate value prop — ad-hoc \"slice the wait events by minute\"
queries against a real history table.
- pg_ash needs \`pg_cron\` which the standard \`postgres:17.2-alpine\`
image doesn't ship. Switching the image *for everyone* would
confound throughput numbers across runs (different shared libraries,
potentially different defaults). Switching it only when the flag is
set keeps the canonical comparison clean while letting curious users
drop into ASH.
## Likely shape
- New \`--with-pg-ash-extension\` CLI flag.
- When set, override \`POSTGRES_IMAGE\` to a Tembo or custom image with
\`pg_cron\` + \`pg_ash\`.
- After \`start_postgres\`, run \`CREATE EXTENSION pg_cron;
CREATE EXTENSION pg_ash;\`. pg_ash schedules its own samplers via
pg_cron — no harness work beyond the install.
- At end of run, dump pg_ash's ASH table into \`raw_pg_ash.parquet\`
alongside \`raw.csv\` so users have both views.
## Out of scope here
- The harness-side sampler stays. It's the canonical data source for
the cross-system overlay; pg_ash would be a *complementary*
exploration tool.
- We are **not** changing the default image. Whatever image option A
introduces is gated behind the flag.
## References
- pg_ash: https://github.com/NikolayS/pg_ash
- Tembo Postgres images (one example with pg_cron):
https://github.com/tembo-io/tembo/tree/main/images
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start with the CLI handling and the start_postgres flow, then review bench_harness/wait_events.py for the existing sampling boundaries. Add the opt-in --with-pg-ash-extension path without changing the default image, install pg_cron and pg_ash after startup, and dump the ASH table to raw_pg_ash.parquet alongside raw.csv.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- postgresql, python
- Bereich
- cli, database, performance
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 52/100