# Share a pgBadger Report — Postgres Log Analysis on a Link

Canonical: https://commareports.com/share-pgbadger-report
Published: 2026-09-01

> pgBadger turns Postgres logs into one interactive HTML report. Publish it to Comma so the slow query gets a thread, the DBA and the app team read the same page, and each run is a revision.

# Share a pgBadger report

pgBadger answers the question every Postgres performance conversation
starts with — which queries are actually costing you — and it answers it
on the database host, where the people who wrote those queries do not
have accounts.

So the report gets read by one person, who screenshots the top-ten table
into a channel, and the application team receives a cropped image of a
normalized query and is asked to do something about it.

## Publish it

```bash
pgbadger --anonymize -o pgbadger.html \
  /var/log/postgresql/postgresql-*.log

curl -fsS -X PATCH \
  "https://commareports.com/api/v1/reports/$COMMA_REPORT_ID" \
  -H "Authorization: Bearer $COMMA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --rawfile html pgbadger.html \
        --arg title "Postgres — $DB — week $(date +%V)" \
        '{title: $title, html: $html}')"
```

Or drag `pgbadger.html` into [the app](https://commareports.com/). The
charts and sortable tables keep working — scripts run inside a sandboxed
iframe (`allow-scripts`, no `allow-same-origin`).

## Treat it as sensitive

Query text reveals schema and business logic even after normalization,
and logs configured with `log_statement = 'all'` can contain literal
parameter values. `--anonymize` helps. Reports are **private by default**
and access is per report — keep database reports team-visible at most.
See the [sharing model](/docs/sharing), and use a
[scoped token](/docs/api-tokens) with `reports:write` only.

## What the URL changes

- **The slow query gets a thread.** "This is the export job, we can move
  it off-peak" pinned to the query row, where the application team will
  see it. See [commenting on HTML](/comment-on-html).
- **A weekly trend.** Revision per run at one URL. See
  [revisions and diffs](/share-html-report).
- **The DBA and the app team read the same page** instead of two
  screenshots of it.
- **On a schedule.** A [routine](/docs/routines) regenerates it weekly —
  see [weekly digests](/features/routines/weekly-analytics-digest).

## Limits

- **HTML body: 5 MB.** A month of logs from a busy instance produces a
  much larger report; narrow the period with `--begin`/`--end`, or
  publish weekly reports rather than one enormous one.
- **60 requests/minute per token.**

## Try it

Comma is free — unlimited reports, unlimited commenters, unlimited
revision history.

**[Create your first report →](https://commareports.com/)**

### Related

- [Profiling reports](/share-profiling-report) — the application side
- [SchemaSpy docs](/share-schemaspy-docs) · [Benchmark reports](/share-benchmark-report)
- [Weekly digests](/features/routines/weekly-analytics-digest) · [Routines](/docs/routines)
