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

Fixes Postgres 10 -> 15 upgrade with 9.4 db dir #2450

Merged
merged 1 commit into from Jun 21, 2023

Conversation

klakin-pivotal
Copy link
Contributor

This commit

  • Fixes the upgrade case where a customer upgraded from Postgres 9.4 to Postgres 10, and then chose to upgrade to Postgres 15. The previous logic expected that when a PG 9.4 directory was present, then a PG 10 AND a PG 13 directory also HAD to be present, or else it would fail the pre-start script early. This commit corrects that logic.
  • Also refactors the logic that checks for older (and unsupported) PG versions, and also the logic that upgrades from supported PG versions to the latest version. Should we ever find ourselves needing to obsolete a version of Postgres, or add a new one, hopefully this rewrite will make modifying this script easier.
  • Fixes a bug introduced in 94522f8

[#185335638]

NOTE: The refactored logic has been "mocked" out and tested, so we're confident in its correctness.
@ystros

This commit
* Fixes the upgrade case where a customer upgraded from Postgres 9.4 to
  Postgres 10, and then chose to upgrade to Postgres 15. The previous
  logic expected that when a PG 9.4 directory was present, then a PG 10
  AND a PG 13 directory also HAD to be present, or else it would fail
  the pre-start script early.
  This commit corrects that logic.
* Also refactors the logic that checks for older (and unsupported) PG
  versions, and also the logic that upgrades from supported PG versions
  to the latest version. Should we ever find ourselves needing to
  obsolete a version of Postgres, or add a new one, hopefully this
  rewrite will make modifying this script easier.

[#185335638]

Signed-off-by: Brian Upton <bupton@vmware.com>
Copy link
Member

@lnguyen lnguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lnguyen lnguyen merged commit 32273e4 into main Jun 21, 2023
4 checks passed
@lnguyen lnguyen deleted the update-pg-10-to-15-upgrade-logic branch June 21, 2023 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants