Studio
RasterizedDB Studio (rdb-studio) is a desktop console for RasterizedDB servers, and for PostgreSQL servers too. Use it to browse and edit tables, run SQL, watch what the server is doing, and drive backups, branches, storage, replication, roles and configuration without typing the statements yourself.
Install
Studio ships with every server release, as rdb-studio-<version>-<platform> on the GitHub releases page:
| Platform | Archive |
|---|---|
| Linux x86-64 | rdb-studio-<version>-linux-x86_64.tar.gz |
| Linux ARM64 | rdb-studio-<version>-linux-arm64.tar.gz |
| Windows x86-64 | rdb-studio-<version>-windows-x86_64.zip |
| Windows ARM64 | rdb-studio-<version>-windows-arm64.zip |
The enterprise edition's Studio, with its LEDGER page, is rdb-studio-enterprise-<version>-<platform> on the same four platforms; see Installing the enterprise edition.
Each archive holds the executable, rdb-studio (rdb-studio.exe on Windows), with its README and licence. It needs a desktop session: on Linux a Wayland or X11 session with a Vulkan or OpenGL driver and glibc 2.39 or newer. The x86-64 builds need an AVX2 CPU, like the server. There is no macOS release build.
VERSION=1.1.0
curl -LO https://github.com/milen-denev/rasterizeddb/releases/download/v$VERSION/rdb-studio-$VERSION-linux-x86_64.tar.gz
tar xzf rdb-studio-$VERSION-linux-x86_64.tar.gz
install -Dm755 rdb-studio-$VERSION-linux-x86_64/rdb-studio ~/.local/bin/rdb-studio
rdb-studioThe Linux archives also carry rdb_studio.desktop and rdb_studio.svg, which a Wayland desktop (KDE Plasma, GNOME) needs to show Studio's name and icon in the taskbar. Install them once:
cd rdb-studio-$VERSION-linux-x86_64
install -Dm644 rdb_studio.desktop ~/.local/share/applications/rdb_studio.desktop
install -Dm644 rdb_studio.svg ~/.local/share/icons/hicolor/scalable/apps/rdb_studio.svg
install -Dm755 rdb-studio ~/.local/bin/rdb-studioFrom source
git clone https://github.com/milen-denev/rasterizeddb.git
cd rasterizeddb
cargo build --release -p rdb_studio
./target/release/rdb_studioStarting it
rdb-studio # opens the connection screen
rdb-studio production # connects straight away with the saved profile "production"The first argument, when given, is the name of a saved connection profile.
Connecting
The connection screen holds a list of saved profiles and a form for a new one. A profile has:
| Field | What it is |
|---|---|
| Name | How the profile is listed, and what to pass on the command line. |
| Server kind | RasterizedDB or PostgreSQL. It decides how Studio asks the server about itself. Studio asks the server one question at connect time and shows a banner if the answer disagrees with your choice. |
| Transport | For RasterizedDB: the native protocol (the default for a new profile, port 61170) or the PostgreSQL wire protocol (port 5432). A PostgreSQL server always uses the wire protocol. |
| Host, port | The server. A host starting with / is a unix socket: for the wire protocol the directory holding .s.PGSQL.<port> (the server's --pg-socket-dir), for the native protocol the socket file (--rdb-socket). |
| Database | The database to open. Switching databases later reconnects. |
| User, password | The role to log in as. |
| Login (native) | Password (SCRAM-SHA-256), Peer (the operating-system user, on a unix socket under --rdb-socket-auth peer) or Trust. |
| TLS | disable, prefer or require for the wire protocol. Over the native protocol TCP is always TLS and a unix socket never is. |
| Verify the server's certificate | Accept only a certificate signed by the CA file (or a public authority) that names the host, and never fall back to cleartext. Needs a server started with a real certificate (--pg-cert/--pg-key, --rdb-cert/--rdb-key); the status bar then says TLS VERIFIED. |
| CA file | The PEM file of the authority that signed the server's certificate; empty for the public roots. |
| Save password | Keep the password, in the OS keyring (the default) or in the profile file. |
Without certificate verification, require and the native protocol's TLS encrypt the connection but do not prove which server answered: a RasterizedDB server makes itself a self-signed certificate when it has none. The connection screen says so under the setting.
Over the native protocol, statements are cut off at the server's --rdb-request-timeout (30 seconds by default); raise it on the server for long reports, or use the wire protocol, which has no such limit. Unix sockets and peer login are not available on Windows.
The server must be listening on the protocol the profile uses: a server started with the default --protocol rastcp has no wire-protocol port, and one started with --protocol pgwire has no native port. --protocol both serves both. See Connecting.
Where profiles and passwords are kept
Profiles are one JSON file, readable by its owner only:
| Platform | Profiles | Saved passwords |
|---|---|---|
| Linux | ~/.config/rdb_studio/connections.json | the Secret Service (GNOME Keyring, KWallet) |
| Windows | %APPDATA%\rdb_studio\connections.json | Credential Manager |
A password is kept only when Save password is on. In the OS keyring (the default) the profile file holds no password; each entry is filed under the service rdb_studio with the profile's name as its account. Keep it in: profile file stores it in the JSON file in plain text, for a machine with no credential store. Turning Save password off or deleting the profile removes the keyring entry.
The screens
| Screen | What it shows and does | Against PostgreSQL |
|---|---|---|
| Dashboard | A live line per metric (transactions, cache hits against scans, sizes) and where the space is going. Sampling stops when the tab is hidden or paused. | yes |
| Overview | Every statistic the server reports, grouped, with the main ones as tiles. | yes |
| Tables | Every table with its sizes and where it is stored (memory, files, S3), and for one table its columns, indexes, partitions and statistics. Create and drop tables; add, rename, retype and drop columns; create and drop indexes; check indexes against rows; create hash-partitioned tables. | yes, without the RasterizedDB-only parts |
| Schema | The foreign keys drawn as a layered map, each line at the column it joins. | yes |
| Data | A page of rows, editable in place, with insert, delete, a WHERE filter, sorting by column and CSV import. | yes |
| Query | A SQL editor: several statements at a time, each with its own result, timings, a row limit, cancel, notices, completion and history. | yes |
| Activity | What the server has been running, what each statement cost, and how many rows it had to read (SHOW QUERIES, SHOW QUERY STATS). | shows what is running now and pg_stat_statements |
| Bench | Queries per second and latency percentiles for one statement over several connections of its own, with warm-up and runs side by side. | yes |
| Backup | What is stored in S3, whether archiving is healthy; back up now, archive the log, prune, and restore into a directory. | reports WAL archiving only |
| Branches | Each branch of a database: create one (now or at a past point), see what a merge would do, then merge, reset, promote or drop. | no |
| Storage | The database's storage directories, how full each is, which holds each table; change the placement policy, rebalance (with a dry run), drain, weight or remove a location, move one table. | tablespaces, read-only |
| Replication | Whether it is on, the peers and how far behind they are; enable, disable, add, pause, resync and drop peers. | standbys, read-only |
| Migrate | Import a live PostgreSQL database into a new database on this server, with a dry-run report first. | no |
| Keys | The key/value store: keys by pattern a page at a time, each value by its type, with its expiry. | no |
| Roles | Who may log in: create a role, set its password, drop it. Password hashes are never read. | yes |
| Config | Every setting: those the server can change live get an edit box and APPLY; the rest show their value and the flag that changes them. | via pg_settings and ALTER SYSTEM |
Databases are created and dropped from the sidebar.
Two more screens: Shards, the cluster map a sharded node serves, who owns how much of the hash space, and any two-phase commit left undecided; and Broker, the message broker's topics, queues, subscriptions, exchanges and bindings.
Query editor
| Keys | Does |
|---|---|
| Ctrl+Enter | Run everything. |
| Ctrl+Shift+Enter | Run only the statement under the cursor. |
| Ctrl+Space | Complete a table, column or keyword. |
| Ctrl+/ | Comment lines out or back in. |
| Tab / Shift+Tab | Indent / unindent. |
| Ctrl+Shift+F | Format. |
| Ctrl+S | Save to a .sql file. |
- SQL is coloured as you type, and a name that is a table (or a column of the selected table) is coloured as one.
- A checker marks errors the server would refuse (an unclosed string or bracket) and warnings it would run:
UPDATEorDELETEwithoutWHERE,= NULL, a missing;, a misspelt keyword, an unknown table. It never stops a statement from running. - Templates write
SELECT,COUNT,INSERT,UPDATEandDELETEfor the selected table with its real columns; the write templates always include aWHERE. - Row limit: 1,000, 10,000 (the default), 100,000 or none per result. A capped result says how many rows there were in all.
- Cancel stops the running statement (SQLSTATE
57014). - Export results to the clipboard or a file as CSV, JSON, Markdown or
INSERTstatements. The data browser exports the page on screen; to export a whole table, run aSELECTand export that. - History keeps every statement the session sent, with duration and outcome. A password after
PASSWORDis stored as'********'. Clicking an entry loads it into the editor without running it. The history can be exported as a script, with failed statements commented out. - Timings are round trips, network and driver included, not server execution time.
Editing rows
Edits address rows by the primary key, or failing that a UNIQUE NOT NULL column. A table with neither is read-only in the data browser, which says so: matching on the row's values could change every duplicate of it. Pages are always ordered by that key.
Import CSV loads a file with a header row into the selected table, matching columns by name. An unquoted empty field is NULL, "" the empty string. Up to 20,000 rows go in one transaction; a larger file goes in several, and a refused batch stops the import with the earlier batches kept.
Configuration
The Config screen shows SHOW CONFIG. A setting the server can change while running gets an edit box; applying it runs SET CONFIG, which needs a superuser. The server keeps such a change across restarts by saving it to rasterizeddb.conf, unless a start-up flag for the same setting overrides it. See Configuration.
Limits
- Studio needs a desktop session with a GPU driver (Vulkan or OpenGL); it does not run headless.
- No macOS release build.
- Over the native protocol, a statement longer than the server's
--rdb-request-timeoutis stopped. - The Branches, Migrate and Keys screens, and the actions on the Backup screen, drive RasterizedDB features and are of no use against PostgreSQL.