cli icon indicating copy to clipboard operation
cli copied to clipboard

`pg:upgrade --version` argument is either broken or the docs are wrong

Open salomvary opened this issue 2 years ago • 2 comments

Do you want to request a feature or report a bug?

Documentation/help bug, or a bug in the --version argument of pg:upgrade.

What is the current behavior?

The help for heroku:upgrade is the following:

$ heroku pg:upgrade --help
unfollow a database and upgrade it to the latest stable PostgreSQL version

USAGE
  $ heroku pg:upgrade [DATABASE]

OPTIONS
  -a, --app=app          (required) app to run command against
  -c, --confirm=confirm
  -r, --remote=remote    git remote of app to use
  -v, --version=version  PostgreSQL version to upgrade to

DESCRIPTION
  to upgrade to another PostgreSQL version, use pg:copy instead

At the time of writing, the latest stable Postgres on Heroku is 14, the default one is 13: https://devcenter.heroku.com/articles/heroku-postgresql#version-support

I've used heroku pg:upgrade without the --version argument to upgrade an instance from 12 to 14. Instead of to 14, it was upgraded to 13.

Now the actual behavior without --version seems to be either to the next major version or to the default version.

What is the expected behavior?

The documentation should be aligned with the behavior.

Ps. "to upgrade to another PostgreSQL version, use pg:copy instead" seems to be wrong. Depending on what "another" means here, pg:upgrade is capable of upgrading to "another" versions.

salomvary avatar Apr 22 '22 16:04 salomvary