官方推荐的现代化超高速构建系统,支持跨平台编译与原生 Windows 支持。
使用 Meson 与 Ninja 快速编译:
meson setup build --prefix=/usr/local/pgsql ninja -C build ninja -C build install
配置构建目录
运行 meson setup build。
并发编译
运行 ninja -C build。
执行安装
运行 ninja -C build install。
-Dnls=enabled #启用多语言支持。
-Dplperl=enabled #启用 PL/Perl。
-Dplpython=enabled #启用 PL/Python。
-Dpltcl=enabled #启用 PL/Tcl。
-Dtcl_version=... #指定 Tcl 版本。
-Dicu=enabled #启用 ICU 支持。
-Dllvm=enabled #启用 LLVM JIT 支持。
-Dlz4=enabled #启用 LZ4 压缩支持。
-Dzstd=enabled #启用 Zstandard 压缩支持。
-Dssl=openssl #启用 SSL/TLS 支持。
-Dgssapi=enabled #启用 GSSAPI 认证支持。
-Dldap=enabled #启用 LDAP 认证支持。相关链接配置。
-Dpam=enabled #启用 PAM 认证支持。
-Dbsd_auth=enabled #启用 BSD 认证支持。
-Dsystemd=enabled #启用 systemd 支持。
-Dbonjour=enabled #启用 Bonjour 支持。
-Duuid=... #指定 UUID 提供程序。
-Dlibcurl=enabled #启用 libcurl 支持。
-Dliburing=enabled #启用 io_uring 支持。
-Dlibnuma=enabled #启用 NUMA 支持。
-Dlibxml=enabled #启用 XML 解析支持。
-Dlibxslt=enabled #启用 XSLT 支持。
-Dsepgsql=enabled #启用 SELinux 支持。
-Dbuildtype=... #构建类型(debug、release 等)。
-Ddebug=... #开启调试符号。
-Doptimization=... #编译器优化级别。
-Dwerror=... #将所有编译警告视为致命错误。
-Dcassert=... #启用 C 语言断言检查。
-Dtap_tests=... #启用 TAP 自动化回归测试。
-Dpg_test_extra=... #运行额外的扩展测试套件。
-Db_coverage=... #生成代码覆盖率分析报告。
-Ddtrace=... #启用 DTrace 探测点。
-Dinjection_points=... #启用错误注入测试点。
-Dsegsize_blocks=... #按数据块数设置段大小。
html #Build documentation in multi-page HTML format
man #Build documentation in man page format
docs #Build documentation in multi-page HTML and man page format
doc/src/sgml/postgres-A4.pdf #Build documentation in PDF format, with A4 pages
doc/src/sgml/postgres-US.pdf #Build documentation in PDF format, with US letter pages
doc/src/sgml/postgres.html #Build documentation in single-page HTML format
alldocs #Build documentation in all supported formats
install #Install postgres, excluding documentation
install-docs #Install documentation in multi-page HTML and man page formats
install-html #Install documentation in multi-page HTML format
install-man #Install documentation in man page format
install-quiet #Like "install", but installed files are not displayed
install-world #Install postgres, including multi-page HTML and man page documentation
uninstall #Remove installed files