Skip to content

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.

  1. 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.

  2. 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.

  3. Upgrade.

    • Installer: curl https://install.hardcharger.gizmodata.com | HARDCHARGER_VERSION=0.3.0 sh installs 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 hardcharger downloads the server version the package pins.
  4. Restart gracefully. On SIGTERM the 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.

  5. Check that the new version runs: SELECT HARDCHARGER_VERSION(), the health endpoint, and your metrics.

The installer keeps every version you installed, so switching back doesn’t download anything:

Terminal window
curl https://install.hardcharger.gizmodata.com | HARDCHARGER_VERSION=<previous version> sh # back
curl https://install.hardcharger.gizmodata.com | HARDCHARGER_VERSION=<newer version> sh # and forward again

--list shows what is installed, the current version starred:

Terminal window
$ curl -s https://install.hardcharger.gizmodata.com | sh > /dev/null 2>&1
$ curl -s https://install.hardcharger.gizmodata.com | sh -s -- --list
Hardcharger versions in …/.hardcharger/versions:
* … (current)
$ ~/.hardcharger/bin/hardcharger-server --version
Hardcharger …

sh -s -- --uninstall 0.1.2 removes one version.