Skip to content

Releases: NikolayS/rpg

v0.11.0

Choose a tag to compare

@NikolayS NikolayS released this 14 Apr 02:37
Immutable release. Only release title and notes can be modified.
0c58b6e

[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 .sql files 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_strings GUC tracking — fixes backslash parsing in E'' strings (#808)
    • Async NOTICE/WARNING buffering for deterministic output ordering (#807)
    • rpg:file:line: error location prefix matching psql's -f behaviour (#803)
    • Wrapped format trailing-space and padding fixes (#809)
    • 3 previously skipped tests un-skipped: copydml, transactions, plpgsql (#810)
  • WASM browser build (experimental). rpg compiles to wasm32-unknown-unknown for 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. See docs/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 EXPLAIN output now gets color-coded nodes, costs, and row counts, matching the existing enhanced format. (#812, #750)
  • /ash sample timeout configurable. The live pg_stat_activity query timeout is now a setting, avoiding freezes on heavily loaded servers. (#805, #771)

Fixed

  • /plan now prepends EXPLAIN to SQL queries instead of running them directly. (#811)
  • Apple Terminal status line. Skip DECSTBM escape 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_ssl on 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

Choose a tag to compare

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

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

Choose a tag to compare

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

Bug fixes and minor improvements.

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

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

Choose a tag to compare

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

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

Choose a tag to compare

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

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

Choose a tag to compare

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

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

Choose a tag to compare

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

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 timestamps — HH: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

Choose a tag to compare

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

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

Choose a tag to compare

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

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

Choose a tag to compare

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

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)