Skip to content

docs: reference pg_durable.database GUC instead of PGDATABASE env var#200

Merged
pinodeca merged 1 commit into
mainfrom
pinodeca/fix-db-vars
Jun 2, 2026
Merged

docs: reference pg_durable.database GUC instead of PGDATABASE env var#200
pinodeca merged 1 commit into
mainfrom
pinodeca/fix-db-vars

Conversation

@pinodeca

@pinodeca pinodeca commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Audited references to PGDATABASE (and related env vars) across the repo. The runtime moved to the pg_durable.database GUC a while back, but a few user-facing docs still claimed the background worker reads its target database from POSTGRES_DB/PGDATABASE.

Changes

  • USER_GUIDE.md — troubleshooting section now points at the pg_durable.database GUC in postgresql.conf.
  • docs/extension_lifecycle.md — two spots in the lifecycle/known-limitations sections corrected to reference the GUC.

Audit notes (no code changes needed)

  • Runtime is already GUC-driven: src/lib.rs registers pg_durable.database; src/types.rs::get_database() reads it and defaults to postgres.
  • The CREATE EXTENSION database-validation message and the frozen sql/pg_durable--0.1.1.sql install fixture already reference the GUC correctly.
  • Shell uses of PGDATABASE in scripts/pg-common.sh, Makefile, scripts/test-upgrade.sh, scripts/test-e2e-local.sh, docs/TESTING.md, and examples/azure-http-domains/scripts/run-test.sh are intentional dev/test ergonomics — they translate the env var into the GUC at cluster-config time.
  • docker-compose.yml sets POSTGRES_DB (postgres image convention) and also passes -c pg_durable.database=pg_durable explicitly. Correct.

Other env vars audited at the same time:

  • PGHOST — real runtime dependency in src/types.rs for the BGW connection string, defaults to 127.0.0.1. Already documented in docs/security-review/workbook-data.md.
  • DUROXIDE_PG_POOL_MAX — internal; the worker sets it from pg_durable.max_duroxide_connections.
  • RUST_LOG — documented.
  • PGUSER / PGPORT — not used; worker uses the pg_durable.worker_role GUC and PostPortNumber from the postmaster.

User-facing docs for troubleshooting and the extension lifecycle still claimed the background worker reads its target database from POSTGRES_DB/PGDATABASE. The runtime moved to the pg_durable.database GUC; update USER_GUIDE.md and docs/extension_lifecycle.md to match.
@pinodeca pinodeca merged commit 914dbf3 into main Jun 2, 2026
4 of 5 checks passed
@pinodeca pinodeca deleted the pinodeca/fix-db-vars branch June 2, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants