Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best Way to Upgrade Postgresql which is deployed using bitnami helm chart #31203

Open
jhsee11 opened this issue Jan 3, 2025 · 3 comments
Open
Assignees

Comments

@jhsee11
Copy link

jhsee11 commented Jan 3, 2025

Name and Version

bitnami/postgresql-ha

What is the problem this feature will solve?

With a major version upgrade on Postgresql which is deployed using bitnami/postgresql-ha helm chart, we can't directly change the Postgresql version in the values.yaml.

Below errors that will be encountered:

  • The data directory was initialized by PostgreSQL version , which is not compatible with this version .

Currently, I am using the method of provisioning a new cluster and restoring the data using the pgdump_all backup file.
Is there any better approach for the upgrade? Kindly advise. Thank you.

What is the feature you are proposing to solve the problem?

Postgresql Major Version Upgrade (eg: from Postgresql 16 -> Postgresql 17)

@carrodher
Copy link
Member

The chart can suffer a major version bump mainly due to two different topics:

  • Changes in the Helm chart code itself requiring a major version according to semver
  • A new major version of PostgreSQL is bundled

When a major version bump is caused by a new PostgreSQL release, the recommended update strategy should follow the guidelines provided by the upstream PostgreSQL maintainers. This approach ensures compatibility and reliability, as the upgrade process is not specific to the Helm chart itself. For additional guidance, refer to the upgrading instructions in the README file: https://github.com/bitnami/charts/tree/main/bitnami/postgresql-ha#upgrading.

@jhsee11
Copy link
Author

jhsee11 commented Jan 6, 2025

The recommended way in the guide is to upgrade using the 'helm upgrade' command. However, as per stated, by using the helm upgrade by just changing the postgres image, it will encounter below error

  • The data directory was initialized by PostgreSQL version , which is not compatible with this version .

is there anyway to prevent this error from happening ?

@carrodher
Copy link
Member

The issue may not be directly related to the Bitnami container image/Helm chart, but rather to how the PostgreSQL itself is being updated.

If you have any questions about the application, customizing its content, or using technology and infrastructure, we highly recommend that you refer to the forums and user guides provided by the project responsible for the application or technology.

With that said, we'll keep this ticket open until the stale bot automatically closes it, in case someone from the community contributes valuable insights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants