返回资讯中心
外部精选
软件工程
#开发者实时流

PostgreSQL 18.7 更新:Debian 与 RedHat 打包者通过依赖约束保护用户

来源标题:Jeremy Schneider: Postgres 18.7 Debian and RedHat Packagers Protect You

PostgreSQL 18.7 发布后,Debian 与 RedHat 的打包者通过包依赖约束阻止了不兼容的混装。在 Debian 上,postgresql-18-cron 要求 postgresql-18 高于 18.6 版本,若系统仍停留在 18.6,安装会因依赖冲突直接失败;解除版本锁定升级到 18.7 后即可正常安装。Rocky 上 pg_cron_18 同样要求 postgresql18-libs 不低于 18.7,被阻止升级时安装报错。

Hacker News 最新bashhq_r2026/11/16 · 昨天8 分钟阅读

以下正文由 AI 翻译自 Hacker News 最新(原文版权归原站所有),可能存在偏差,重要内容请以原文为准。

apt-mark hold postgresql-18 apt-get install -y postgresql-18-cron 关键输出(安装失败): postgres (PostgreSQL) 18.6 (Debian 18.6-1.pgdg12+2) postgresql-18-cron : Depends: postgresql-18 (> 18.7) but 18.6-1.pgdg12+2 is to be installed E: Unable to correct problems, you have held broken packages. ... 允许升级: apt-mark unhold postgresql-18 apt-get install -y postgresql-18-cron postgres --version 关键输出: The following packages will be upgraded: libpq5 postgresql-18 postgresql-18-jit postgresql-client-18 Setting up postgresql-18 (18.7-1.pgdg12+2) ... Setting up postgresql-18-cron (1.6.8-1.pgdg12+3) ... ... 包元数据: apt-cache show postgresql-18-cron 所选候选版本的关键输出: Version: 1.6.8-1.pgdg12+3 Depends: postgresql-18 (>> 18.7), libc6 (>= 2.14), libpq5 (>= 9.0~) 在 Rocky 上: 在阻止 PostgreSQL 升级的情况下尝试安装不带版本号的扩展: dnf install -y --exclude='postgresql18*' pg_cron_18 关键输出(安装失败): Problem: package pg_cron_18-1.6.8-4PGDG.rhel9.8.x86_64 from pgdg18 requires postgresql18-libs(x86-64) >= 18.7, but none of the providers can be installed

  • cannot install the best candidate for the job
  • package postgresql18-libs-18.7-1PGDG.rhel9.8.x86_64 from pgdg18 is filtered out by exclude filtering ... 允许升级(上面的排除只对那一条命令生效): dnf install -y pg_cron_18 rpm -q postgresql18-server pg_cron_18 rpm -q --requires pg_cron_18 关键输出: Installing: pg_cron_18 x86_64 1.6.8-4PGDG.rhel9.8 Upgrading: postgresql18 x86_64 18.7-1PGDG.rhel9.8 postgresql18-libs x86_64 18.7-1PGDG.rhel9.8 postgresql18-server x86_64 18.7-1PGDG.rhel9.8 postgresql18-server-18.7-1PGDG.rhel9.8.x86_64 pg_cron_18-1.6.8-4PGDG.rhel9.8.x86_64 ... 相关的 RPM 依赖要求: postgresql18-libs(x86-64) >= 18.7 postgresql18-server

如今大多数在 Kubernetes 上运行 Postgres 的人都会自己构建容器镜像,把扩展直接编译进自定义的容器镜像里。构建这类镜像最常见的方式就是直接使用 Debian 软件包。上面提到的打包保护机制同样会保护这些用户——如果你的容器能成功构建,说明你用的版本组合是正确的。

CloudNativePG 为 Postgres 18 及更高版本提供了扩展容器。如果你使用 CNPG 的扩展目录(extension catalogs),那就不会有问题,因为它们实际上是滚动发布的;昨天我们已经确认,扩展目录中包含了最新版本的核心 postgres 和所有扩展——你拿到的始终是最新的 PG 小版本和最新的扩展版本。

不过,如果你是手动挑选并固定扩展容器的 digest/版本,而不与 Postgres 服务器的 digest/版本绑定,那么你就得自己负责,确保不要混用不兼容的扩展版本和服务器版本。

真正需要特别小心的是那些不使用打包生态、而是从源码构建并安装扩展(和/或数据库)的人。如果你自己管理 postgres 生态代码的构建/CI,那么下周你应该会忙于处理这个最新的 Postgres 小版本发布。

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →