# PostgreSQL 19 Beta 2 — REPACK CONCURRENTLY bench

First-party harness for the FactualMinds field report on PostgreSQL 19 Beta 2.

**Published results:** [`out/results.csv`](out/results.csv) (captured 2026-07-17 UTC).

**Engine under test:** official Docker image `postgres:19beta2-alpine` (`server_version=19beta2`). Same major engine as Amazon RDS Database Preview Environment (us-east-2) as of 2026-07-16. This is **not** a managed RDS Preview run — the authoring AWS IAM principal lacked `rds:*` permissions; timings are community-engine first-party numbers.

## Requirements

- Docker Desktop (or compatible engine)
- `bash`, `python3`

## Quick start

```bash
cd docs/artifacts/postgresql-19-repack-bench
./run-bench.sh
# optional scale:
# ROW_COUNT=5000000 BLOAT_PASSES=3 ./run-bench.sh
```

Results land in `out/results.csv`, `out/bench-log.txt`, and `out/meta.txt`.

## What it measures

1. Build a bloated table (`bench_orders`) via bulk INSERT + UPDATE/DELETE churn
2. Wall-clock of blocking `REPACK (ANALYZE, VERBOSE)` vs `REPACK (CONCURRENTLY, ANALYZE, VERBOSE)`
3. Concurrent SELECT success rate during CONCURRENTLY (probe session)

## Headline result (2026-07-17 run)

| Metric | Value |
| --- | --- |
| Rows (target) | 2,000,000 |
| Size before | 873 MB |
| Dead tuples before | 2,028,674 |
| Blocking REPACK | 4.167 s → 429 MB |
| CONCURRENTLY REPACK | 4.494 s → 429 MB |
| SELECT probes during CONCURRENTLY | 60 ok / 0 fail |
