Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@merll
Copy link
Contributor

@merll merll commented Oct 20, 2025

πŸ“Œ Summary

This PR updates platform and image catalog images for CloudnativePG databases from the deprecated Debian bullseye base images to the recent trixie. Since that includes newer libraries, reindexing is required.

Runtime upgrades were changed to run asynchronously per application. This avoids unnecessary waiting cycles (i.e. one app still waiting to sync, while another would be ready), and also upgrade failures of one app affecting another.

NOTE: Upgrade notes should include the following post-upgrade information:

  • Workloads using CloudnativePG have their images updated automatically, when using the image catalog (i.e. without manually set imageName). These workloads will show a warning in their logs on every connect, and every client will also receive a warning message about needing to run the SQL script below. Only for platform databases, this is performed automatically.
  • The following script needs to be run for all CloudnativePG clusters, and for each database (including postgres). The duration and expected load depends on the size of the database.
    REINDEX DATABASE <database name>;
    ALTER DATABASE <database name> REFRESH COLLATION VERSION;
    For performing this step for a cluster without any added or renamed databases in one step, with kubectl access to the cluster the following command lines can be used. Before the SQL operations, the primary pod needs to be determined:
    kubectl get cluster -n <team namespace> <cluster name> -o jsonpath='{.status.currentPrimary}'
    kubectl exec -n <namespace> <primary pod> -- psql -d postgres -S -c 'REINDEX DATABASE postgres' -c 'ALTER DATABASE postgres REFRESH COLLATION VERSION'
    kubectl exec -n <namespace> <primary pod> -- psql -d <cluster name> -S -c 'REINDEX DATABASE <cluster name>' -c 'ALTER DATABASE <cluster name> REFRESH COLLATION VERSION'

πŸ” Reviewer Notes

🧹 Checklist

  • Code is readable, maintainable, and robust.
  • Unit tests added/updated

@merll merll merged commit e77dffd into main Oct 27, 2025
12 checks passed
@merll merll deleted the APL-1138 branch October 27, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants