Repository navigation
Releases: NikolayS/rpg
Release list
v0.11.0
[0.11.0] - 2026-04-13
Added
- psql compatibility: 222 of 232 native PostgreSQL regression tests passing. rpg now runs PostgreSQL's own regression test suite (unmodified
.sqlfiles from the postgres source tree) in CI on every push and PR — both psql and rpg execute the same queries against the same server, outputs are normalized and diff'd. Pass means byte-identical output. This regression testing runs continuously and gates every merge, ensuring compatibility never silently regresses. Full report:docs/psql-compat.md. Key improvements in this release:- 8 new describe commands:
\dP(partitioned relations),\dA/\dAc(access methods / operator classes),\dO(collations),\dF/\dFd/\dFp/\dFt(text search objects) (#806) standard_conforming_stringsGUC tracking — fixes backslash parsing inE''strings (#808)- Async NOTICE/WARNING buffering for deterministic output ordering (#807)
rpg:file:line:error location prefix matching psql's-fbehaviour (#803)- Wrapped format trailing-space and padding fixes (#809)
- 3 previously skipped tests un-skipped:
copydml,transactions,plpgsql(#810)
- 8 new describe commands:
- WASM browser build (experimental). rpg compiles to
wasm32-unknown-unknownfor browser use via WebSocket proxy. SQL queries, most\meta-commands,/version,/dba, and error reporting all work. Line editing with arrow keys, history, and Ctrl-U/K/W supported. Seedocs/WASM.md. (#759) - Connection info + SSL status on startup. The welcome banner now shows database, user, host, port, and TLS protocol/cipher — matching psql startup output.
- EXPLAIN syntax highlighting. Plain
EXPLAINoutput now gets color-coded nodes, costs, and row counts, matching the existing enhanced format. (#812, #750) /ashsample timeout configurable. The livepg_stat_activityquery timeout is now a setting, avoiding freezes on heavily loaded servers. (#805, #771)
Fixed
/plannow prependsEXPLAINto SQL queries instead of running them directly. (#811)- Apple Terminal status line. Skip
DECSTBMescape on Apple Terminal to prevent scroll-region rendering artifacts. - AI config hint. When AI key is not set, the message now shows the config file path (
~/.config/rpg/config.toml) instead of listing individual commands. - CodeQL cleartext-logging. Password no longer flows through connection display or logging paths; TLS metadata queried from
pg_stat_sslon the server instead of the password-tainted client handshake. (#817)
Tests
- Native psql regression test suite runs in CI on every push/PR, gating merges on byte-identical output with psql. (#788)
- Multi-host failover tests enabled in CI. (#757)
- PostgreSQL regress test script portable to bash 3.2. (#801)
- PG14–17 partition test output normalization. (#800)
- WAL bytes timing variance normalization. (#802)
Full Changelog: v0.10.2...v0.11.0
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)
