Upgrading
Hardcharger™ follows semantic versioning. Before 1.0, a minor version
(0.3 to 0.4) may change options or behavior; the release notes
say what, under Changed. Patch versions only fix things.
-
Read the release notes for every version between yours and the new one. Look for renamed options (an unknown option stops the server at startup, so you’ll know at once) and changed defaults.
-
Check the database file format. DuckDB 2.0 reads files written by DuckDB 1.x. A file is only upgraded to a newer storage format when you ask for it (
storage_version), so you can go back as long as you didn’t. -
Upgrade.
- Installer:
curl https://install.hardcharger.gizmodata.com | HARDCHARGER_VERSION=0.3.0 shinstalls the version next to the others and switches to it. Restart the server. - Docker or Kubernetes: change the image tag. Pin versions (
:0.3.0), not:latest, so that a restart never upgrades by surprise. - Python:
pip install --upgrade hardchargerdownloads the server version the package pins.
- Installer:
-
Restart gracefully. On
SIGTERMthe server stops taking new work and lets running statements finish (graceful shutdown). With several replicas, upgrade one at a time: drivers move to a new session when theirs goes away. -
Check that the new version runs:
SELECT HARDCHARGER_VERSION(), the health endpoint, and your metrics.
Rolling back
Section titled “Rolling back”The installer keeps every version you installed, so switching back doesn’t download anything:
curl https://install.hardcharger.gizmodata.com | HARDCHARGER_VERSION=<previous version> sh # backcurl https://install.hardcharger.gizmodata.com | HARDCHARGER_VERSION=<newer version> sh # and forward again--list shows what is installed, the current version starred:
$ curl -s https://install.hardcharger.gizmodata.com | sh > /dev/null 2>&1$ curl -s https://install.hardcharger.gizmodata.com | sh -s -- --listHardcharger versions in …/.hardcharger/versions: * … (current)$ ~/.hardcharger/bin/hardcharger-server --versionHardcharger …sh -s -- --uninstall 0.1.2 removes one version.