PostgreSQL Linux 软件包、版本与 PGDG 仓库
按 Linux 发行版核对 PostgreSQL 18、PostgreSQL 19、客户端与扩展软件包,理解默认仓库、PGDG、版本号和安全回溯
Linux 上的“安装 PostgreSQL”不是一个稳定不变的命令。发行版、release、仓库来源、CPU 架构和软件包名共同决定最终安装的 major、打包 revision 与安全修复。本页把 PkgSeek 的动态软件包证据与本站的安装、升级规则组合起来。
软件包快照证据 · PkgSeek
各 Linux 发行版默认 postgresql 软件包
| 发行版 | 版本 | 索引版本 | 仓库 | 关联公告 |
|---|---|---|---|---|
| Alibaba Cloud Linux | 3 | 13.23-3.0.1.al8 | official / updates | 0 |
| Alibaba Cloud Linux | 4 | 15.18-1.alnx4 | official / updates | 0 |
| AlmaLinux | 10 | 16.14-1.el10_2 | official / AppStream | 0 |
| AlmaLinux | 9 | 18.4-2.module_el9.8.0+280+5ad12178 | official / AppStream | 0 |
| Arch | rolling | 18.4-3 | official / extra | 0 |
| CentOS Stream | 10 | 16.14-1.el10 | official / AppStream | 0 |
| CentOS Stream | 9 | 13.23-3.el9 | official / AppStream | 0 |
| Debian | trixie | 17+278 | official / main | 3 |
| deepin | 25.2 | 16+255 | official / main | 0 |
| Fedora | 42 | 16.13-1.fc42 | official / updates | 0 |
| Fedora | 43 | 18.3-2.fc43 | official / updates | 0 |
| Fedora | 44 | 18.3-2.fc44 | official / updates | 0 |
| Kali Linux | kali-rolling | 18+290 | official / main | 0 |
| Kylin OS | V10-SP1 | 12+214kylin0.1 | official / 10.1-main | 0 |
| Kylin OS Server | V10-SP3-2403 | 10.5-23.p09.ky10 | official / updates | 0 |
| OpenAnolis | 23.4 | 15.18-1.an23 | official / updates | 0 |
| OpenAnolis | 8.10 | 12.22-7.0.1.module+an8.10.0+11420+6683745d | official / AppStream | 0 |
| openEuler | 24.03-LTS-SP4 | 15.18-1.oe2403sp4 | official / everything | 0 |
| openSUSE | 15.6 | 18-150600.17.9.1 | official / update-sle | 0 |
| openSUSE | tumbleweed | 18-3.4 | official / oss | 0 |
| Oracle Linux | 10 | 16.14-1.0.1.el10_2 | official / appstream | 0 |
| Oracle Linux | 8 | 12.22-6.0.1.module+el8.10.0+90932+f6d78e3c | official / appstream | 34 |
| Oracle Linux | 9 | 13.23-3.el9_8 | official / appstream | 26 |
| Raspberry Pi OS | bookworm | 15+248+deb12u1 | official / bookworm-main | 0 |
| Raspberry Pi OS | trixie | 17+278 | official / trixie-main | 0 |
| Red Hat Enterprise Linux | 10.2 | 16.14-1.el10_2 | official / AppStream | 0 |
| Red Hat Enterprise Linux | 9.8 | 18.4-2.module+el9.8.0+24359+da7fad50 | official / AppStream | 0 |
| Rocky Linux | 10 | 16.14-1.el10_2 | official / AppStream | 0 |
| Rocky Linux | 9 | 13.23-3.el9_8 | official / AppStream | 13 |
| Ubuntu | focal | 12+214 | official / main | 0 |
| Ubuntu | jammy | 14+238 | official / main | 0 |
| Ubuntu | noble | 16+257build1 | official / main | 0 |
| Ubuntu | resolute | 18+290ubuntu1 | official / main | 0 |
| Void Linux | rolling | 18_1 | official / current | 0 |
先分清四类包名
| 类型 | 常见示例 | 含义 |
|---|---|---|
| 发行版元包 | postgresql | 跟随该发行版选择的默认 major |
| 版本化服务端 | postgresql-18、postgresql18-server | 明确绑定 major,实际命名因 DEB/RPM 生态不同 |
| 客户端与开发包 | postgresql-client-18、libpq-dev、postgresql-devel | 提供 psql、libpq header 或编译文件,不一定运行服务端 |
| 扩展包 | postgresql-18-pgvector、pgvector | 还要与 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
| 发行版 | 版本 | 索引版本 | 仓库 | 关联公告 |
|---|---|---|---|---|
| Ubuntu | resolute | 18.3-1 | official / main | — |
软件包快照证据 · PkgSeek
Ubuntu PGDG 中的 postgresql-18
PkgSeek 没有为这个坐标返回准确匹配。这只表示“当前快照未收录”,不等于“软件包不存在”;执行操作前仍需核对上游仓库。
上方分别查询 Ubuntu 官方仓库与 PGDG 的准确坐标。若卡片显示“没有准确索引坐标”,它描述的是索引覆盖,不是对目标仓库内容的否定。需要安装时,以目标系统实际的 apt-cache policy 和 PostgreSQL 官方仓库说明为最终依据。
apt-cache policy postgresql postgresql-18 postgresql-client-18
apt-cache madison postgresql-18PostgreSQL 19 软件包跟踪
软件包快照证据 · PkgSeek
发行版仓库中的 postgresql-19
PkgSeek 没有为这个坐标返回准确匹配。这只表示“当前快照未收录”,不等于“软件包不存在”;执行操作前仍需核对上游仓库。
在 PostgreSQL 19 仍为 Beta 时,缺少稳定发行版包是正常状态。即使测试构建出现,也应把 Beta 兼容性通道与生产 PostgreSQL 18 分开;升级判断见 PostgreSQL 18 升级 19 指南。
安全地使用软件包证据
- 记录
distro + release + source + repository + architecture + full version。 - 先确认包提供的是服务端、客户端、开发文件还是扩展。
- 对 CVE 优先使用发行版厂商公告和回溯状态;不要只比较上游版本前缀。
- 软件包安装成功后验证实际连接的服务端,不要只运行
psql --version。 - 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 executionPkgSeek 提供只读 MCP 工具目录和 OpenAPI 3.1;接入边界见 AI 上下文契约。
Last updated on