CockroachDB
CockroachDB speaks the PostgreSQL protocol, so KryoDesk opens it with its PostgreSQL engine: the same login and TLS sequence, the same read-only transaction around every operation, the same Databases window (schemas of the connected database) and the same query editor. This page lists only what is different.
Session
Section titled “Session”Sessions → New session → Databases, arrow of the tile → CockroachDB (port 26257).
| Field | Values | Default | What it does |
|---|---|---|---|
| Encryption | Preferred, Required, Disabled | Preferred | As for PostgreSQL. A node started with --insecure offers no TLS. |
| Database | Name; empty = postgres |
Empty | CockroachDB creates defaultdb and postgres. |
| Client certificate | PEM file | Empty | Presented in the TLS handshake (certificate authentication, e.g. client.root.crt). Not with TLS disabled. |
| Client key | Unencrypted PKCS#8 PEM (BEGIN PRIVATE KEY) |
Empty | Key of the certificate. cockroach cert create-client --also-generate-pkcs8-key writes one; or openssl pkcs8 -topk8 -nocrypt -in client.root.key -out client.root.pk8. A key readable by other users is reported (chmod 600). |
| AS OF SYSTEM TIME | Empty, follower, or a negative interval (-10s, -500ms, -5m, -1h) |
Empty | Every operation starts with BEGIN TRANSACTION READ ONLY AS OF SYSTEM TIME …: follower = follower_read_timestamp() (follower reads), an interval = data as of that time. Anything else is refused when the session is saved. |
The client certificate fields also exist for PostgreSQL sessions (cert authentication in
pg_hba.conf).
The password is kept in the vault under the PostgreSQL key, password:postgres://user@host:port.
With a client certificate and no saved password the first attempt goes without a password.
Detection
Section titled “Detection”After login the first read-only operation reads version(). A value starting with
CockroachDB switches on the differences below, also in a PostgreSQL session or a
postgres:// quick connection; a CockroachDB session whose server is not CockroachDB is
reported in the console and continues as PostgreSQL (without AS OF SYSTEM TIME). The tab and
the Databases window show CockroachDB v26.4.2 instead of the PostgreSQL version the server
emulates (server_version_num).
Differences handled
Section titled “Differences handled”| PostgreSQL behaviour | On CockroachDB | What KryoDesk does |
|---|---|---|
pg_stat_ssl shows protocol and cipher |
Empty | No query; TLS state from the client: with TLS required (every login attempt asks for it) the state is verified or pinned, details “protocol and cipher not reported”. |
| SCRAM channel binding (SCRAM-SHA-256-PLUS) with a pinned certificate | Not offered | Not required for a CockroachDB session; the console says so. The pin authenticates the server; the password goes inside TLS by the server’s method (SCRAM-SHA-256 or clear text). In a PostgreSQL session the usual question “Log in without channel binding?” appears. |
pg_class.relispartition |
NULL |
Read as false (coalesce). |
Functions in pg_proc |
Missing columns or functions in some versions | A failing function list leaves the tree without routines; the error is in the console. |
| Isolation | SERIALIZABLE always |
Nothing to do: every operation is read-only and ends with ROLLBACK. |
AS OF SYSTEM TIME |
CockroachDB only | Session field above; ignored with a warning on PostgreSQL. |
The query editor names CockroachDB statements whose effect ROLLBACK does not undo before
sending them: CANCEL (queries, sessions, jobs), PAUSE / RESUME (jobs), BACKUP /
EXPORT (files on external storage), crdb_internal.* functions, CHANGEFEED, SPLIT AT /
UNSPLIT / SCATTER / RELOCATE (ranges of the cluster) and external storage or sink URIs
(s3://, gs://, azure://, nodelocal://, userfile://, kafka://, http(s)://, …). They
are sent; CockroachDB refuses some inside a transaction, and the login’s privileges limit the
rest.
PostgreSQL refuses SET TRANSACTION READ WRITE once the operation’s transaction has read
(SQLSTATE 25001); CockroachDB is not known to. There the check of transaction_read_only after
every editor statement, in the same transaction, closes the connection when it is not on, and
every operation ends with ROLLBACK.
Console
Section titled “Console”The commands are the PostgreSQL ones: status (also reads AS OF SYSTEM TIME … when set),
databases, cancel (PostgreSQL cancel request, supported by CockroachDB).