{
  "slug": "railway-postgres-pgbouncer-management-ccc7f1956ca5",
  "title": "Railway Postgres PgBouncer management",
  "tools": [
    "railway"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-08-08T01:06:37.000Z",
  "announced_at": "2026-08-08T01:06:37.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When managing PgBouncer for a Postgres service, use `railway postgres pgbouncer` with the relevant subcommand; selectors targeting a PgBouncer or HAProxy edge resolve to the database root. Configure requires at least one setting, and its warnings are advisory per the release note.",
    "examples": [
      "railway postgres pgbouncer status --service <postgres-service>",
      "railway postgres pgbouncer add --service <postgres-service> --pool-mode transaction",
      "railway postgres pgbouncer configure --service <postgres-service> --max-client-conn 200"
    ],
    "gotchas": [
      "Version: v5.33.0",
      "--service <service>: Select the service; edge-node selectors resolve to the database root. The documented examples use `--service postgres`.",
      "--pool-mode <transaction|session|statement>: Select the pooling mode; `add` defaults to `transaction`.",
      "--max-client-conn <integer>: Maximum client connections PgBouncer accepts; must be at least 1.",
      "--default-pool-size <integer>: Default pool size per user/database pair; must be at least 1.",
      "--max-prepared-statements <integer>: Maximum prepared statements per connection; 0 disables it, and it is ignored outside transaction mode.",
      "configure setting group (required): At least one of `--pool-mode`, `--max-client-conn`, `--default-pool-size`, or `--max-prepared-statements` is required; multiple may be supplied together.",
      "--replicas <integer> (required): Target replica count for `scale`; must be 0 or greater. Documented scaling selects one active region; zero or multiple active regions require direct `railway scale` instead.",
      "--yes, -y: Skip the confirmation prompt for add or remove.",
      "--no-deploy: Commit the config change without triggering deploys; it applies on the next deploy.",
      "Replica count is summed from deploy.multiRegionConfig because production does not write the legacy flat field.",
      "Configuration misconfiguration warnings are advisory and never blocking."
    ]
  },
  "why_it_matters": "Inspect or change PgBouncer configuration, pool mode, regional replica count, or service presence for a Postgres deployment.",
  "sources": [
    "https://github.com/railwayapp/cli/releases/tag/v5.33.0",
    "https://github.com/railwayapp/cli/pull/1054",
    "https://github.com/railwayapp/cli/blob/v5.33.0/src/commands/postgres/pgbouncer.rs"
  ],
  "rank": 0.93031,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-20261016",
    "verdict_id": "wave1b-20261016:wave1b-20261016-f7d60bcc72fa9d29-6:gate",
    "evidence_hash": "77f239bcc490b829686a650ec6614beada76a7b7951eb42bad71415c0a1158c7"
  },
  "review": {
    "draft_hash": "20c2160648e5223f8da78b38841b36cb9ea0fe2744b7836ce73f6108560a16e6",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-20261016:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.93 >= 0.9; 2 needed) and Jev gave 0.64 (>= 0.6 needed)."
  }
}
