postgres/postgres
Dependencies
PostgreSQL has no language-level package manifest. External libraries are detected at configure time. This page summarizes what the build looks for and what it does with each.
Mandatory or near-mandatory
These are required for a useful production build:
| Library | Detected by | Used for |
|---|---|---|
| libc | toolchain | Everything. POSIX or Win32. |
| GNU make ≥ 3.81 | configure | autoconf build. (Meson is an alternative.) |
| bison | configure | gram.y, pl_gram.y, repl_gram.y, etc. Cached output is shipped, so a stable build can sometimes skip it; development cannot. |
| flex | configure | scan.l, pl_scanner.l, etc. Same caveat as bison. |
| Perl ≥ 5.14 | configure | Code generation (genbki.pl, Gen_fmgrtab.pl, etc.) and the TAP test harness. |
| ICU | --with-icu |
Collation support. Effectively mandatory in recent versions. |
| OpenSSL | --with-openssl |
TLS/SSL, plus pgcrypto. Production deployments effectively require it. |
| zlib | configure | Compressed dumps. |
Frequently used optional
Built-in only when the corresponding flag is passed:
| Library | Flag | Purpose |
|---|---|---|
| LLVM | --with-llvm |
JIT'd expression and tuple-deforming. |
| liburing | --with-liburing |
Linux io_uring AIO method. |
| libxml2 | --with-libxml |
xml data type and XPath. |
| libxslt | --with-libxslt |
xml2 contrib's XSLT functions. |
| Readline or libedit | --with-readline (default) |
psql line editing. |
| Perl headers | --with-perl |
PL/Perl. |
| Python ≥ 3.x headers | --with-python |
PL/Python. |
| Tcl headers | --with-tcl |
PL/Tcl. |
| GSSAPI / Kerberos | --with-gssapi |
GSSAPI authentication and gss connection encryption. |
| PAM | --with-pam |
PAM authentication. |
| LDAP | --with-ldap |
LDAP authentication. |
| systemd | --with-systemd |
sd_notify integration with systemd-managed services. |
| liblz4 | --with-lz4 |
LZ4 compression for TOAST and WAL. |
| libzstd | --with-zstd |
Zstd compression for TOAST and WAL. |
| bonjour / DNS-SD | --with-bonjour |
macOS service advertisement. |
| selinux + libsepol | --with-selinux |
sepgsql contrib (Linux-only mandatory access control). |
| DTrace | --enable-dtrace |
Static probes (Solaris, FreeBSD, Linux via systemtap). |
Build-time-only
These are needed at build time but not at runtime:
- bison + flex — regenerate
gram.c,scan.c, etc. - Perl — runs
genbki.pland friends. - a working
pg_config— when building extensions out of tree via PGXS.
Runtime-only
- POSIX or Windows OS APIs.
- A POSIX shell (for archive_command, etc., when configured).
Where the configure logic lives
- autoconf:
configure.acat the repo root, with the generatedconfigurechecked in. Macros underconfig/. Per-feature checks likePGAC_CHECK_OPENSSLetc. - Meson:
meson.buildat the repo root andmeson_options.txt. Mirrors the autoconf options with a-D<name>=<value>interface. - Header detection: Many
#ifdef HAVE_xxx_Hchecks throughout the source. The project adds them as new platform variants surface.
Platform support
Officially tested on:
- Linux (glibc, musl), macOS, Windows (MSVC + MinGW), FreeBSD, OpenBSD, NetBSD, illumos, AIX, HP-UX, Solaris.
The project's buildfarm runs continuous builds on a wide set of these. New platform support comes mostly from contributors at vendors who run PostgreSQL on those platforms.
Vendored code
The repo carries a small amount of bundled third-party code:
src/backend/regex/— a fork of Henry Spencer's regex library, heavily modified.src/backend/snowball/— Martin Porter's stemmers for full-text search.src/timezone/— a copy of the IANA tz database, refreshed on tz updates.src/port/getopt_long.c— a portable copy when the system one isn't usable.src/include/getopt_long.h— same.src/tools/pg_bsd_indent/— a fork of BSDindentused bypgindent.
Vendored copies are updated periodically by the maintainers of the corresponding subsystems; you'll see commits like Update time zone data files to tzdata release 2026b. in the history.
Out-of-tree extensions
PostgreSQL's package ecosystem is much wider than contrib/. Extensions — from PostGIS to TimescaleDB to pgvector — live in their own repositories and link against the installed libpq and server headers via PGXS. They do not appear in the dependencies story for the core build but are part of the broader project ecosystem.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.