Skip to content

Support upgrading Postgres when using rtx

What does this merge request do and why?

This change makes it possible for users who are on rtx rather than asdf to upgrade their Postgres database. rtx already works pretty well for GDK development, so we shouldn't add friction unnecessarily when possible.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

When on rtx, run the script. Without this change, it will output:

WARNING: PostgreSQL data directory is version 13 and must be upgraded to version 14.9 before GDK can be updated.
WARNING: PostgreSQL will be auto-updated in 10 seconds. Hit CTRL-C to abort.
Available PostgreSQL versions: {13=>"/opt/homebrew/Cellar/postgresql@13/13.12/bin"}
ERROR: Unable to find target PostgreSQL version 14
Successfully ran 'support/upgrade-postgresql' script!

It will succeed with the code in this MR.

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.

Merge request reports