Skip to content

Releases: NikolayS/rpg

v0.10.2 — /ash cursor polish

02 Apr 13:29
Immutable release. Only release title and notes can be modified.
fbe9575

Choose a tag to compare

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; Clear widget prevents transparency artifacts
  • Display freeze after Esc fixed — returns to Live immediately (was stuck up to 60s)
  • Overlay timestamp shows HH:MM:SS (was HH: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 u16 overflow panics on wide terminals

Full changelog

See CHANGELOG.md for details.

v0.10.1

01 Apr 22:30
Immutable release. Only release title and notes can be modified.
d5992fd

Choose a tag to compare

Bug fixes and minor improvements.

Full Changelog: v0.10.0...v0.10.1

v0.10.0 — /ash cursor, history pan, context-sensitive timeline

01 Apr 21:55
Immutable release. Only release title and notes can be modified.
869c477

Choose a tag to compare

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_history state ordering to prevent stale timeout behavior
  • Fixed hint line missing b:back when panning while drilled down
  • Added 13 new tests for pan/cursor/hint functionality
  • Removed dead zoom_in/zoom_out code

Full Changelog: v0.9.2...v0.10.0

v0.9.2 — /ash statement_timeout, key event fix, :varname aliases

30 Mar 04:58
Immutable release. Only release title and notes can be modified.
c2290f3

Choose a tag to compare

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

29 Mar 16:11
Immutable release. Only release title and notes can be modified.
a96f01f

Choose a tag to compare

What's changed

Bug fixes

  • fix(repl): :varname aliases now correctly invoke backslash commands (#767)

    psql allows setting command aliases in ~/.psqlrc:

    \set dba '\i /path/to/postgres_dba/start.psql'
    

    Then typing :dba at the prompt invokes the menu. rpg was checking for \ before interpolating variables, so :dba fell 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

28 Mar 17:23
Immutable release. Only release title and notes can be modified.
8512453

Choose a tag to compare

What's new

Active Session History — /ash

  • Live wait event timeline/ash opens 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, Enter to expand to events, Enter again 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 timestampsHH:MM:SS at zoom 1–2 (1 s/15 s buckets) so labels visibly tick every second; HH:MM at 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 /explain and /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,5433 tries hosts in order; first success wins. Supports per-host ports and single-port-for-all-hosts.

Demo

quickstart 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

25 Mar 15:08
Immutable release. Only release title and notes can be modified.
7dd16b9

Choose a tag to compare

Added

  • Interactive history picker (\s). Press \s to 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-ca no longer fails with SAN-bearing certificates. On rustls 0.23 / webpki 0.103+, servers that present certificates with Subject Alternative Names return CertificateError::NotValidForNameContext instead of the legacy NotValidForName variant. NoCnVerifier now 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

25 Mar 15:08
Immutable release. Only release title and notes can be modified.
c1b21d2

Choose a tag to compare

Fixed

  • URI query-string host= and port= parameters now respected. Previously, passing postgres://ignored:9999/db?host=localhost&port=5433 would silently discard the query-string overrides and attempt to connect to ignored:9999. The internal URI parser has been replaced with delegation to tokio_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

24 Mar 06:23
Immutable release. Only release title and notes can be modified.
dc09357

Choose a tag to compare

Fixed

  • Default host now detects an active PostgreSQL socket instead of checking if the socket directory exists. Previously, if /var/run/postgresql existed but had no running Postgres, rpg would try to connect there and fail. Now it checks for the actual .s.PGSQL.5432 socket file — same assumption libpq makes. (#725)
  • sslmode=prefer now 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

24 Mar 03:40
Immutable release. Only release title and notes can be modified.
384a2ef

Choose a tag to compare

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=require now works correctly with self-signed certificates and non-public-CA servers. Previously, rpg verified the server certificate even in require mode, causing a TLS handshake failure. sslmode=require means 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 with require to 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)