从 Zalando postgres-operator 迁移
本节适用于将 PostgreSQL 集群从 Zalando postgres-operator(acid.zalan.do/v1 postgresql,即此前随 Alauda Container Platform 提供的基于 Spilo/Patroni 的栈)迁移到 CloudNativePG(postgresql.cnpg.io/v1)的用户。
为什么要迁移,以及预期结果
-
不会出现性能回退。 CNPG v1.29.1 的发布资格验证包含了与 Zalando 栈在相同硬件上的 A/B 对比(相同的 sysbench OLTP 工作负载,并按场景匹配
shared_buffers和max_connections):CloudNativePG 在 全部八个场景 中都与 Zalando 栈持平或更优(TPS 和 P95 延迟)。 -
扩展功能等价。 所有捆绑扩展都随 PostgreSQL operand 镜像一起提供:
Debian trixie 的 TimescaleDB 软件包从 PG 15 开始提供——如果 Zalando 用户在 PG 14 上使用 TimescaleDB,应在迁移期间升级到 PG 15+(PG 14 已接近生命周期结束)。TimescaleDB 构建版本为 Apache-2 OSS 版本,与 Spilo 的
APACHE_ONLY=true等效——与 Zalando 相比不会损失能力。 -
架构简化:不再需要 Patroni 或外部 DCS,不再需要 Spilo 超大镜像,提供 Kubernetes 原生故障切换,以及声明式配置——参见架构。