网页 综合 更新时间 2026-11-09 08:06:54

Beyond the Version Bump: Running PostgreSQL Major Upgrades in Percona Operator for PostgreSQL - Percona

自动蜘蛛 www.percona.com 正文约 3150 字
Enterprise-ready open source PostgreSQL
Percona Software for PostgreSQL
Open source PostgreSQL software for production workloads
Model infrastructure requirements for PostgreSQL deployments.
Download PostgreSQL software and tools
Enterprise Support and Services
Expert help to run PostgreSQL in production
Open source MySQL for enterprise use
Percona Software for MySQL
Production-ready open source MySQL software
Compare DBaaS vs MySQL on Kubernetes cloud costs
Download MySQL software and tools
Enterprise Support and Services
Expert help to run MySQL in production
Enterprise-grade value for MongoDB®
Percona Software for MongoDB®
Source-available, enterprise-grade compatible software for MongoDB®
Compare MongoDB® deployment options, costs, and trade-offs.
Download MongoDB® software and tools
Enterprise Support and Services
Expert help to run MongoDB® in production
Run and manage Redis or Valkey
Discover the benefits of migrating from Redis to Valkey
Download Valkey software and tools
Enterprise Support and Services
Expert help to run Redis and Valkey in production
Monitoring & Management (PMM)
Coroot Percona Edition
Expert Consulting and Services
It was quite challenging to perform postgres major upgrade, e.g., v17 to v18, in a Percona operator/K8s environment. There was no convenient approach to accomplish this task. The only viable solutions left were a Manual Dump/Restore to a new environment or using Logical replication.
But these options were not free from challenges. Procuring a new Infrastructure/Cluster or running the manual process is complex and error-prone. Logical replication has its own caveats; not everything can be replicated smoothly using the native logical option.
Moreover, performing a manual pg_upgrade (In-Place) in the Operator/K8S environment is risky and unsupported.
This problem was addressed effectively by our engineering team, and they released a technical release of the Major Upgrade option under Postgres Operator v2.4.0. After a couple of releases, the Major Upgrade feature finally became generally available (GA) under operator v2.9.0.
If you are still running a pretty old Operator version, it must be upgraded to at least the latest Operator v2.4.0-1 https://docs.percona.com/percona-operator-for-postgresql/3.0.0/update-operator.html to avail the “Major Upgrade” feature.
Let’s see, step by step and in detail, how we can accomplish the major upgrade.
Existing Operator/DB Environment:
Target Operator/DB Major Version:
We should always compare the complete patch version, as it might happen that we have the same Major/Minor version, say RHEL(8.x); however, the Patched version (8.x.x) is different and ultimately affects the underlying glibc. So even if only the patch version changes, we should take it seriously and verify the collation changes and, at a minimum, rebuild the indexes: https://docs.percona.com/percona-operator-for-postgresql/3.0.0/update-db-major.html#check-collation to avoid any corruption or consistency issues.
2. Now we will upgrade the Operator and CRD version from 2.4.0 → 2.5.1.
Once the rollout is complete, we can see the upgraded operator image to v2.5.1.
访问原文 返回搜索 https://www.percona.com/blog/beyond-the-version-bump-running-postgresql-major-upgrades-in-percona-operator-for-postgresql/
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。