v0.9.0 — multiple servers, friendly connection errors
Highlights
Several servers, one pgtui. Keep all your PostgreSQL clusters in one place and switch between them without restarting: press S (or ctrl+o).
Connection failures you can act on. An unreachable or misconfigured server no longer makes pgtui exit with a raw driver error. It tells you what happened and what to check:
Cannot connect to “db1” — Server did not respond
No answer from 192.168.150.171:5432 within the connect timeout.
What to check: The host may be down, unreachable from this machine (missing route or VPN),
or a firewall is silently dropping port 5432. Check with: nc -vz 192.168.150.171 5432
⚠️ Upgrading from v0.8 or older: automatic, nothing to do
config.yml moves to format 2 (a list of named servers). On the first run of v0.9.0:
- Backup: your old
config.yml(singledatabase_url/host… at the top level) is backed up verbatim toconfig.yml.v1.bak(mode0600). - Conversion: your connection becomes a server named after its host and is set as the default. Your settings (
refresh_seconds,update_check, …) are kept. - Legacy
.env: a.envleft in/opt/pgtui,~/.config/pgtuior/etc/pgtuiis imported and retired to.env.v1.bak. It has been silently ignored since v0.8. A.envin your working directory is never touched. - Notice: a one-time notice explains what was done.
Delete the *.v1.bak files once you're sure you won't downgrade. If the new file can't be written (permissions), pgtui runs with the converted settings in memory, tells you so, and finishes the upgrade on the next save.
DATABASE_URL / PG* still work and still take precedence. They now appear as a session-only server named env, which is never saved to the file.
New
-
Servers screen (
S). It opens on first run and whenever the startup connection fails.Key Action enterconnect a/e/dadd / edit / delete ttest (latency + server version) *set default -
Server settings:
- Host: a hostname, an IP or a unix-socket directory (
/var/run/postgresql, peer auth, no password stored). - Password: optional
password_env, or leave it empty and use~/.pgpass. - Tags:
dev/staging/prod. The header always shows the active server, with PROD in red. - Per server:
host_ram_mb/host_cpusfor the Tuning advisor.
- Host: a hostname, an IP or a unix-socket directory (
-
CLI:
pgtui -s NAMEopens a specific server,pgtui --listlists them. -
Friendly connection errors:
Group Cases Network not responding, refused, no route, unknown host Local server missing unix socket, server starting up Access bad password, pg_hbarejection, missing database, out of connectionsTLS SSL disabled on the server, certificate verification The raw driver error stays available under "Technical details".
-
Background connect: connections open in the background with a visible connecting… state, and
esccancels.
Fixed
- Stale results after a switch: results arriving after a server switch (a slow query, the previous dashboard's refresh) are dropped instead of rendering under the new server.
- Failed switch: a failed switch keeps your current session.
PGTUI_CONFIG_DIR: it now replaces the config search instead of being prepended. Tests could previously pick up a real/opt/pgtui/config.yml.- Alerts: short messages no longer render in a mostly empty full-height box.
Removed / cleanup
.env.example: removed, since.envfiles have not been read since v0.8.- Legacy keys: the top-level
database_url/host/port/user/password/database/sslmodekeys are only read during migration. - Installer:
install.shseeds a format-2config.yml(0600) and, on upgrade, says when a migration will run.
Install / upgrade
curl -fsSL https://raw.githubusercontent.com/9level/pgtui/master/install.sh | shOr use Update now in the in-app prompt. Every binary is static (Linux / macOS, amd64 / arm64), and its SHA-256 is in SHA256SUMS.
Full changelog: v0.8.0...v0.9.0 · PR #1