Releases: NikolayS/rpg
v0.10.2 — /ash cursor polish
What's fixed
- Cursor no longer obscures bars — uses
▐(right half-block) so bar color is visible through the cursor - Floating overlay moved LEFT of cursor with
▶arrow;Clearwidget prevents transparency artifacts - Display freeze after Esc fixed — returns to Live immediately (was stuck up to 60s)
- Overlay timestamp shows
HH:MM:SS(wasHH:MM) - X-axis labels right-aligned with bars, visible with few data points, overlap-safe
- Horizontal grid lines (
┈) at Y-axis label rows - Cursor detection fixed when panning beyond history (leftmost column no longer falsely highlighted)
- Overlay positioning uses saturating arithmetic — no
u16overflow panics on wide terminals
Full changelog
See CHANGELOG.md for details.
v0.10.1
Bug fixes and minor improvements.
Full Changelog: v0.10.0...v0.10.1
v0.10.0 — /ash cursor, history pan, context-sensitive timeline
What's New
/ash UX overhaul (#774, closes #773)
- History pan with Left/Right arrows. Left pans backward in time (auto-switches Live to History mode); Right pans forward and returns to Live when reaching "now". Display freezes during pan for precise inspection.
- Cursor crosshair. When panning, a bright yellow half-block marks the selected column. A floating overlay shows timestamp, total AAS, and a color-coded breakdown of all non-zero wait types for that bucket.
- Context-sensitive timeline. At the WaitEvent drill level, the stacked bar chart shows individual wait events within the selected type. At the QueryId level, it shows queries within the selected event. Each sub-dimension uses a deterministic color palette.
- Zoom keys reassigned to
[/]. Frees up Left/Right for history pan. Footer hint updated with 4 context-sensitive variants.
Fixes
- Fixed potential UTF-8 panic in overlay label truncation
- Fixed
in_historystate ordering to prevent stale timeout behavior - Fixed hint line missing
b:backwhen panning while drilled down - Added 13 new tests for pan/cursor/hint functionality
- Removed dead
zoom_in/zoom_outcode
Full Changelog: v0.9.2...v0.10.0
v0.9.2 — /ash statement_timeout, key event fix, :varname aliases
What's new
/ash: observer-effect protection
Live pg_stat_activity queries and pg_ash history queries now run under a 500ms statement_timeout. On very busy clusters where the sample query itself takes too long, the tick is skipped and a missed: N counter appears in the status bar — the TUI never hangs or blocks.
/ash: Y-axis no longer skewed by key presses
Arrow keys, space, and other inputs previously triggered an immediate re-sample, producing extra data points per second and inflating the Y-axis. Key events are now drained within the current sample interval (wall-clock anchored). Navigation and drill-down still feel instant — the frame redraws immediately on any key press.
:varname alias expansion fixed
Setting \set dba '\i /path/start.psql' and typing :dba now correctly triggers \i rather than being treated as SQL. Closes #741.
Richer connect banner (from v0.9.1)
Version string now includes commit count and short hash when built past a release tag, e.g. rpg 0.9.2+0-c2290f3f. Full server version and AI provider/model shown on connect.
Full changelog
See CHANGELOG.md for details.
v0.9.1
What's changed
Bug fixes
-
fix(repl):
:varnamealiases now correctly invoke backslash commands (#767)psql allows setting command aliases in
~/.psqlrc:\set dba '\i /path/to/postgres_dba/start.psql'Then typing
:dbaat the prompt invokes the menu. rpg was checking for\before interpolating variables, so:dbafell through to SQL. Fixed in all three input paths (interactive, file runner, dumb loop).This restores full compatibility with postgres_dba and any psqlrc alias that maps a variable to a backslash command.
v0.9.0
What's new
Active Session History — /ash
- Live wait event timeline —
/ashopens a full-screen TUI with a scrolling stacked-bar chart of active sessions grouped by wait event type - Drill-down —
↑↓to select a wait type,Enterto expand to events,Enteragain to see individual queries - pg_ash history integration — when the pg_ash extension is installed, the timeline pre-populates with historical data on startup; bars appear immediately instead of building from scratch
- X-axis timestamps —
HH:MM:SSat zoom 1–2 (1 s/15 s buckets) so labels visibly tick every second;HH:MMat coarser zoom levels - Zoom syncs refresh rate —
←→changes bucket size and live sampling interval together - Actual data window — status bar shows real data span (e.g.
22s) instead of ring-buffer capacity
AI commands
- Compact output for
/explainand/optimize— structured, terminal-friendly formatting instead of raw prose
SQL and terminal
- EXPLAIN syntax highlighting — execution plans rendered with color
- Shell backtick substitution in PROMPT1/PROMPT2 — dynamic prompts via shell commands (e.g.
PROMPT1='[git branch --show-current] %/ # ') - Interactive history picker for
\s— browse and search query history in a TUI \vs/command convention — backslash commands (\d,\dt,\l, ...) are native psql meta-commands, unchanged. Slash commands (/fix,/optimize,/explain,/ash, ...) are rpg-specific — both AI and non-AI. Muscle memory for psql stays intact; rpg additions are always visually distinct. All slash commands listed in\?.
Connections
- Multi-host failover —
-h host1,host2 -p 5432,5433tries hosts in order; first success wins. Supports per-host ports and single-port-for-all-hosts.
Demo
Changelog
- feat(ash): pg_ash history integration — pre-populate /ash timeline from ash.samples (#761)
- fix(ash): show HH:MM:SS on X axis at zoom 1–2 (bucket ≤ 15 s)
- fix(ash): sync sampling rate to zoom level; show actual data window (#763)
- feat(connection): multi-host failover (#751)
- feat(ash): Active Session History TUI — /ash command (#756)
- feat(repl): establish
\vs/command convention (#755) - feat(explain): syntax highlighting for EXPLAIN output (#749)
- feat(prompt): shell backtick substitution in PROMPT1/PROMPT2 (#748)
- feat(ai): compact structured output for /explain and /optimize (#747)
- feat(repl): interactive history picker for \s (#701)
v0.8.4
Added
- Interactive history picker (
\s). Press\sto open a fuzzy-searchable TUI list of recent query history. Entries can be selected and inserted into the prompt, or written to a file with\s filename. (#701)
Fixed
sslmode=verify-cano longer fails with SAN-bearing certificates. On rustls 0.23 / webpki 0.103+, servers that present certificates with Subject Alternative Names returnCertificateError::NotValidForNameContextinstead of the legacyNotValidForNamevariant.NoCnVerifiernow catches both variants, so verify-ca correctly skips hostname validation while still verifying the certificate chain. (#738, closes #712)
Tests
- Unit test coverage increased from 68% toward 75% (+107 tests, 1809 total). (#702)
v0.8.3
Fixed
- URI query-string
host=andport=parameters now respected. Previously, passingpostgres://ignored:9999/db?host=localhost&port=5433would silently discard the query-string overrides and attempt to connect toignored:9999. The internal URI parser has been replaced with delegation totokio_postgres::Config::from_str(), which handles all standard libpq parameters correctly. (#731) - Default socket detection now finds any
.s.PGSQL.<port>socket, not only port 5432.default_host_port()scans well-known socket directories for any PostgreSQL socket file and returns the lowest-numbered port found, with port 5432 fast-pathed for the common case. (#728) - Integration tests for the full connection path matrix (groups A-G from issue #709). (#730)
v0.8.2
Fixed
- Default host now detects an active PostgreSQL socket instead of checking if the socket directory exists. Previously, if
/var/run/postgresqlexisted but had no running Postgres, rpg would try to connect there and fail. Now it checks for the actual.s.PGSQL.5432socket file — same assumption libpq makes. (#725) sslmode=prefernow correctly establishes TLS with self-signed certificates. Previously it fell back silently to plaintext when the server had a non-public-CA cert. Now it encrypts when possible, skipping certificate verification — matching psql/libpq semantics. (#726)
v0.8.1
Fixed
- Connection errors now show the real cause instead of the opaque "db error" or "error connecting to server" messages. rpg walks the error source chain to surface the underlying OS/network error, e.g. "Connection refused (os error 111)" or "No such host is known" — matching psql behavior. (#708)
sslmode=requirenow works correctly with self-signed certificates and non-public-CA servers. Previously, rpg verified the server certificate even inrequiremode, causing a TLS handshake failure.sslmode=requiremeans encrypt only — no certificate verification — which is the correct psql semantics. SSL error messages are also improved: "SSL error: server does not support SSL" when connecting withrequireto a non-TLS server. (#711)- Serialize env-mutating tests to prevent flaky failures in CI. (#718)
- Added SSL mode connection tests (D1-D6) to CI. (#714)
- Stable conninfo SQL query; SCRAM port for A7 test. (#716)
- Security: bump rustls-webpki 0.103.9 → 0.103.10 (CVE GHSA-pwjx-qhcg-rvj4). (#719)
