# pgrust Documentation > Technical reference for pgrust, a PostgreSQL 18.3-compatible server rewritten in Rust: install and run paths, process modes, configuration constraints, Docker contract, contrib builtins, and regression harnesses. This is a Grok-Wiki source-grounded repository documentation set. Use the complete Markdown link when an agent needs the full repo context. ## Context Links - [Complete Markdown docs](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/llms-full.txt) - [Complete Markdown alias](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21.md) - [Human interactive docs](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21) - [GitHub repository](https://github.com/malisper/pgrust) ## Repository - Repository: malisper/pgrust - Generated: 2026-07-10T05:34:34.017Z - Updated: 2026-07-10T05:36:29.487Z - Runtime: Grok CLI - Format: Documentation - Pages: 21 ## Pages - [Overview](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/01-overview.md): What pgrust exposes as a Postgres 18.3-shaped server binary, who should use it, status limits, and the first docs routes for Docker, source build, and regression verification. - [Installation](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/02-installation.md): Prerequisites, system packages, build-time share-dir wiring, and producing the release postgres binary from a clone. - [Quickstart](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/03-quickstart.md): Shortest local path: build, --initdb with -L, start with required stack and io_method settings, connect with psql, and verify version() and a trivial query. - [Docker](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/04-docker.md): Run malisper/pgrust or a local image build with the official postgres-shaped contract, connect with psql, and confirm first-boot init via entrypoint. - [Compatibility and status](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/05-compatibility-and-status.md): Postgres 18.3 behavior and on-disk compatibility, regression-oracle model, non-production status, and extension/PL boundaries that block generic Postgres extensions. - [Process modes and dispatch](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/06-process-modes-and-dispatch.md): How the single postgres binary dispatches: postmaster default, --single, --boot, --check, --describe-config, and the pgrust-specific initdb/--initdb entry. - [Install paths and share directory](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/07-install-paths-and-share-directory.md): PGRUST_PGSHAREDIR and related build-time path env vars, runtime -L override, vendored share tree contents, and why wrong share/tz paths break boot. - [Seams and builtin libraries](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/08-seams-and-builtin-libraries.md): Seam registration model, seams-init aggregation, and dfmgr builtin-library registration that replaces dlopen for ported contrib and regress helpers. - [Initialize a cluster](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/09-initialize-a-cluster.md): Create PGDATA with postgres --initdb: supported flags, directory layout, bootstrap and post-bootstrap phases, and success signal text. - [Run the server](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/10-run-the-server.md): Start postmaster with -D, socket/TCP flags, mandatory io_method=sync and stack settings, connect with psql, and confirm readiness. - [Boot from existing Postgres data](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/11-boot-from-existing-postgres-data.md): Constraints for reusing a Postgres 18.3 PGDATA: control file checks, major-version expectations, and practical recovery when byte order or catalog state does not match. - [Use contrib extensions](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/12-use-contrib-extensions.md): Ported contrib modules registered as builtins (citext, hstore, ltree, pg_trgm, pgcrypto, pg_stat_statements, uuid-ossp, and others), CREATE EXTENSION against vendored control/SQL, and what remains unported. - [Run regression tests](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/13-run-regression-tests.md): Clone-only scripts/run-regression against vendored PG 18.3 SQL/expected files, psql client requirements, selective test names, and optional isolation/auth/recovery TAP harnesses. - [postgres CLI reference](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/14-postgres-cli-reference.md): Flags from --help, must-be-first dispatch options, -c/--NAME=VALUE GUC overrides, and exit paths for --version and --describe-config. - [initdb options reference](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/15-initdb-options-reference.md): Supported pgrust initdb argv: -D/--pgdata, -U/--username, -L, -E/--encoding, locale flags, --wal-segsize; space-separated parsing; unsupported options that error. - [Configuration reference](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/16-configuration-reference.md): Required and high-impact runtime settings: io_method default vs sync, max_stack_depth, RUST_MIN_STACK, ulimit -s, listen_addresses, and build-time PGRUST_* path env vars. - [Docker environment reference](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/17-docker-environment-reference.md): POSTGRES_PASSWORD, POSTGRES_USER, POSTGRES_DB, POSTGRES_INITDB_ARGS, POSTGRES_HOST_AUTH_METHOD, PGDATA, init scripts under /docker-entrypoint-initdb.d, and injected server opts. - [Test harness environment reference](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/18-test-harness-environment-reference.md): Environment variables and defaults for run-regression, serial/pg_regress, isolation, auth/ldap TAP, and recovery TAP: PGRUST_BIN, PGRUST_PSQL, PG_SRC, PG_INSTALL, ports, OUTDIR. - [Build from source](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/19-build-from-source.md): Host packages, PGRUST_PGSHAREDIR bake-in, cargo build --release --locked --bin postgres, wasm64 single-user notes, and binary location target/release/postgres. - [Workspace and crate checks](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/20-workspace-and-crate-checks.md): Cargo workspace scale, fast-check profile, scripts/check-crate and scripts/gate-crate, and how to validate a single ported crate plus seams-init. - [Troubleshooting](https://grok-wiki.com/public/docs/malisper-pgrust-7e0c8e82bc21/pages/21-troubleshooting.md): Known failure modes: missing io_method=sync, stack overflows, wrong share/tz path, initdb option gaps, root execution refused, missing psql client, and unported extension loads. ## Source Files - `.cargo/config.toml` - `.dockerignore` - `Cargo.toml` - `crates/_support/seam/init/Cargo.toml` - `crates/_support/seam/init/src/bin/postgres.rs` - `crates/_support/seam/init/src/lib.rs` - `crates/_support/seam/seam_core/src/lib.rs` - `crates/backend/main/initdb/src/lib.rs` - `crates/backend/main/main_main/src/help.rs` - `crates/backend/main/main_main/src/lib.rs` - `crates/backend/postmaster/postmaster/src/gucreads.rs` - `crates/backend/postmaster/postmaster/src/main_entry.rs` - `crates/backend/storage/buffer/bufmgr/src/buf_aio.rs` - `crates/backend/tcop/postgres/src/guc.rs` - `crates/backend/test_regress/src/lib.rs` - `crates/backend/utils/fmgr/dfmgr_seams/src/lib.rs` - `crates/backend/utils/init/miscinit/src/boot_paths.rs` - `crates/backend/utils/misc/guc_tables/src/consts.rs` - `crates/backend/utils/misc/guc_tables/src/tables.rs` - `crates/common/controldata_utils/src/lib.rs` - `crates/contrib/hstore/src/lib.rs` - `crates/contrib/pg_stat_statements/src/lib.rs` - `crates/contrib/pg_trgm/src/lib.rs` - `crates/contrib/pgcrypto/src/lib.rs` - `crates/pl/plpgsql/src/handler/src/lib.rs` - `crates/wasm-libc-shim/src/lib.rs` - `docker/entrypoint.sh` - `docker/README.md` - `Dockerfile` - `LICENSE` - `README.md` - `scripts/cargo-fast-check` - `scripts/check-crate` - `scripts/gate-crate` - `scripts/run-auth-tap` - `scripts/run-ldap-tap` - `scripts/run-pg-isolation` - `scripts/run-pg-regress` - `scripts/run-pg-regress-serial` - `scripts/run-recovery-tap` - `scripts/run-regression` - `vendor/postgres-18.3/share/extension/hstore.control` - `vendor/postgres-18.3/share/pg_hba.conf.sample` - `vendor/postgres-18.3/share/postgres.bki` - `vendor/postgres-18.3/share/postgresql.conf.sample`