-
Notifications
You must be signed in to change notification settings - Fork 882
feat: check Postgres version on startup, require 16.7 / 17.3, update earthdistance extension #4639
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
feat: check Postgres version on startup, require 16.7 / 17.3, update earthdistance extension #4639
Conversation
✅ Deploy Preview for teslamate ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
to be clear - this will intentionally break existing installs not running on 16.7+ / 17.3+ and enforces users to upgrade. from my checks supported versions should be available on all supported platforms. @JakobLichterfeld - i suggest releasing it as part of v1.34 and mention it in the release notes? |
|
What is this going to do users who are running on installations that do not support PostgreSQL 16 or 17, but are running fine on 15 or below? Are we comfortable locking them at v1.33? |
|
That would be the consequence... Based on supported installs there shouldn't be any but i guess there are some installs out there... Others (GitLab) are raising their minimum version yearly, too. With 18.0 (due in two months) requiring v16 as minimum. |
|
Is there a way users can check their minor version? Migrating is a bit of work. I'm on 16 but not sure which minor version. Is this something we could display in Grafana for example? |
|
Migrating between minors is "no" work, compose pull, down, up You can see your current version in the database dashboard |
add migration updating earthdistance extension update docs reflecting required versions
|
Yes, easier when you trust postgres minor versions. Is this also documented on the migration page or is that too much detail and users will be confused? The best way is to back up, clear the volume, pull the new version, and restore. It's best because it works for any version upgrade but takes much longer. So if folks can understand what they're doing, the pull/down/up is a great shortcut. |
|
It's not explicitly stated (the shortcut for minors) but the title in the docs is: "Upgrading PostgreSQL to a new major version". All install install code is not pinning to specific minors so upgrades can happen anytime. By how we documented Upgrading TeslaMate a new PostgreSQL minor will be fetched automatically at that time. Manual installs are upgraded via package managers as well. See Upgrades in the official docs. https://www.postgresql.org/support/versioning/ Open for extending the docs if others agree that providing more context helps! |
Yes, and that's exactly what we describe here: https://docs.teslamate.org/docs/maintenance/upgrading_postgres |
Imo the docs are sufficent there: https://docs.teslamate.org/docs/upgrading It is not in TeslaMate's responsibility to educate the users how to update their docker stacks, nor when to do so. Pulling new minor PostgreSQL, grafana or mosquitto or anything else should be done on regular basis according to own update strategy. |
This PR adds a check for on startup that validates the PostgreSQL version used.
Requirements are set to 16.7+ / 17.3+ - if not matched, an exception is raised.
In addition a migration is added that updates the earthdistance extension to 1.2 (bundled since 16.7 / 17.3).
Feedback welcome, fixes #4638