PostgreSQL Field Guide

PostgreSQL Linux 软件包、版本与 PGDG 仓库

按 Linux 发行版核对 PostgreSQL 18、PostgreSQL 19、客户端与扩展软件包,理解默认仓库、PGDG、版本号和安全回溯

Linux 上的“安装 PostgreSQL”不是一个稳定不变的命令。发行版、release、仓库来源、CPU 架构和软件包名共同决定最终安装的 major、打包 revision 与安全修复。本页把 PkgSeek 的动态软件包证据与本站的安装、升级规则组合起来。

软件包快照证据 · PkgSeek

各 Linux 发行版默认 postgresql 软件包

已收录
发行版版本索引版本仓库关联公告
Alibaba Cloud Linux313.23-3.0.1.al8official / updates0
Alibaba Cloud Linux415.18-1.alnx4official / updates0
AlmaLinux1016.14-1.el10_2official / AppStream0
AlmaLinux918.4-2.module_el9.8.0+280+5ad12178official / AppStream0
Archrolling18.4-3official / extra0
CentOS Stream1016.14-1.el10official / AppStream0
CentOS Stream913.23-3.el9official / AppStream0
Debiantrixie17+278official / main3
deepin25.216+255official / main0
Fedora4216.13-1.fc42official / updates0
Fedora4318.3-2.fc43official / updates0
Fedora4418.3-2.fc44official / updates0
Kali Linuxkali-rolling18+290official / main0
Kylin OSV10-SP112+214kylin0.1official / 10.1-main0
Kylin OS ServerV10-SP3-240310.5-23.p09.ky10official / updates0
OpenAnolis23.415.18-1.an23official / updates0
OpenAnolis8.1012.22-7.0.1.module+an8.10.0+11420+6683745dofficial / AppStream0
openEuler24.03-LTS-SP415.18-1.oe2403sp4official / everything0
openSUSE15.618-150600.17.9.1official / update-sle0
openSUSEtumbleweed18-3.4official / oss0
Oracle Linux1016.14-1.0.1.el10_2official / appstream0
Oracle Linux812.22-6.0.1.module+el8.10.0+90932+f6d78e3cofficial / appstream34
Oracle Linux913.23-3.el9_8official / appstream26
Raspberry Pi OSbookworm15+248+deb12u1official / bookworm-main0
Raspberry Pi OStrixie17+278official / trixie-main0
Red Hat Enterprise Linux10.216.14-1.el10_2official / AppStream0
Red Hat Enterprise Linux9.818.4-2.module+el9.8.0+24359+da7fad50official / AppStream0
Rocky Linux1016.14-1.el10_2official / AppStream0
Rocky Linux913.23-3.el9_8official / AppStream13
Ubuntufocal12+214official / main0
Ubuntujammy14+238official / main0
Ubuntunoble16+257build1official / main0
Ubunturesolute18+290ubuntu1official / main0
Void Linuxrolling18_1official / current0
快照核对时间: 2026年8月2日 15:47 UTC. 发行版 revision 与回溯补丁属于完整版本身份;关联公告为 0 也不是永久安全保证。打开软件包查询

先分清四类包名

类型常见示例含义
发行版元包postgresql跟随该发行版选择的默认 major
版本化服务端postgresql-18postgresql18-server明确绑定 major,实际命名因 DEB/RPM 生态不同
客户端与开发包postgresql-client-18libpq-devpostgresql-devel提供 psql、libpq header 或编译文件,不一定运行服务端
扩展包postgresql-18-pgvectorpgvector还要与 server major、架构和扩展版本一起核对

只看到包名相似不能证明用途相同。安装后分别验证客户端和服务端:

psql --version
sudo -u postgres psql -X -d postgres \
  -c "select version(), current_setting('server_version_num');"

发行版仓库与 PGDG

发行版官方仓库通常维护其选定的 major;PostgreSQL Global Development Group 仓库常用于取得其他受支持 major。选择 PGDG 会增加一条外部软件源,也意味着需要持续核对仓库签名、release 支持、升级策略和退出路径。

软件包快照证据 · PkgSeek

Ubuntu 官方仓库中的 postgresql-18

已收录
发行版版本索引版本仓库关联公告
Ubunturesolute18.3-1official / main
快照核对时间: 2026年8月2日 15:47 UTC. 发行版 revision 与回溯补丁属于完整版本身份;关联公告为 0 也不是永久安全保证。打开软件包查询

软件包快照证据 · PkgSeek

Ubuntu PGDG 中的 postgresql-18

没有准确索引坐标

PkgSeek 没有为这个坐标返回准确匹配。这只表示“当前快照未收录”,不等于“软件包不存在”;执行操作前仍需核对上游仓库。

快照核对时间: 2026年8月2日 15:47 UTC. 发行版 revision 与回溯补丁属于完整版本身份;关联公告为 0 也不是永久安全保证。打开软件包查询

上方分别查询 Ubuntu 官方仓库与 PGDG 的准确坐标。若卡片显示“没有准确索引坐标”,它描述的是索引覆盖,不是对目标仓库内容的否定。需要安装时,以目标系统实际的 apt-cache policy 和 PostgreSQL 官方仓库说明为最终依据。

apt-cache policy postgresql postgresql-18 postgresql-client-18
apt-cache madison postgresql-18

PostgreSQL 19 软件包跟踪

软件包快照证据 · PkgSeek

发行版仓库中的 postgresql-19

没有准确索引坐标

PkgSeek 没有为这个坐标返回准确匹配。这只表示“当前快照未收录”,不等于“软件包不存在”;执行操作前仍需核对上游仓库。

快照核对时间: 2026年8月2日 15:47 UTC. 发行版 revision 与回溯补丁属于完整版本身份;关联公告为 0 也不是永久安全保证。打开软件包查询

在 PostgreSQL 19 仍为 Beta 时,缺少稳定发行版包是正常状态。即使测试构建出现,也应把 Beta 兼容性通道与生产 PostgreSQL 18 分开;升级判断见 PostgreSQL 18 升级 19 指南

安全地使用软件包证据

  1. 记录 distro + release + source + repository + architecture + full version
  2. 先确认包提供的是服务端、客户端、开发文件还是扩展。
  3. 对 CVE 优先使用发行版厂商公告和回溯状态;不要只比较上游版本前缀。
  4. 软件包安装成功后验证实际连接的服务端,不要只运行 psql --version
  5. major 改变时走 pg_upgrade、dump/restore 或逻辑复制,不能把换包当成升级数据目录。

空结果不是不存在

软件包索引有覆盖范围和刷新时间。页面显示“没有准确索引坐标”时,应继续核对上游仓库;不要让人或 AI 根据空数组生成确定性结论。

给 AI / Agent 的最小契约

task: resolve_postgresql_package
target:
  distro: ubuntu
  release: noble
  architecture: amd64
  source: pgdg
requirements:
  - return exact package coordinates and observed_at
  - separate indexed fact, inference, and unknown
  - never interpret missing index data as package absence
  - ask before repository, package, service, or data changes
  - verify client and server versions after execution

PkgSeek 提供只读 MCP 工具目录OpenAPI 3.1;接入边界见 AI 上下文契约

Last updated on

On this page