hardbyte / hardbyte/postgresql-job-queue-benchmarking

Follow-up: expose pg_ash extension as opt-in once the image story is sorted

Ouverte
#9 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
HTML
Étoiles
2
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par la gestion de la CLI et le flux start_postgres, puis examinez bench_harness/wait_events.py pour connaître les limites d’échantillonnage existantes. Ajoutez le parcours opt-in --with-pg-ash-extension sans modifier l’image par défaut, installez pg_cron et pg_ash après le démarrage, puis exportez la table ASH vers raw_pg_ash.parquet à côté de raw.csv.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
postgresql, python
Domaine
cli, database, performance
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
52/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.