pgwire

NodeDB speaks the PostgreSQL wire protocol on port 6432. Any tool that speaks Postgres works.

psql -h localhost -p 6432

Supported Features

  • Simple Query protocol
  • Extended Query protocol (prepared statements: Parse, Bind, Describe, Execute)
  • COPY FROM (bulk import)
  • LISTEN/NOTIFY (cluster-wide)
  • SCRAM-SHA-256 authentication
  • TLS
  • Session variables
  • Server-side cursors (SCROLL, BACKWARD, MOVE, WITH HOLD)
  • Temporary tables (session-scoped)

Introspection & Administration

SHOW Commands

SHOW ROLES;
SHOW STATS;                        -- alias: SHOW SERVER STATS
SHOW METRICS;
SHOW MEMORY;
SHOW TENANTS WITH NAME <name>;

SHOW STATS returns live query latencies, throughput, and resource usage. SHOW METRICS exports Prometheus-format metrics. SHOW MEMORY shows per-engine memory allocation and jemalloc stats.

SET Commands

Session-level configuration:

SET TENANT = '<name>' | <id> | DEFAULT;  -- superuser only — switch session tenant

pg_catalog Compatibility

NodeDB exposes virtual pg_catalog tables for Postgres-client compatibility, BI tools, and ORM introspection:

  • pg_class — Collections and materialized views
  • pg_namespace — Databases and schemas
  • pg_attribute — Collection columns and types
  • pg_index — Index metadata
  • pg_type — Data types

Tools like DBeaver, Tableau, and SQLAlchemy automatically query these tables. No special setup required.

Compatible Clients

Any PostgreSQL client library: libpq, JDBC, psycopg2, node-postgres, SQLAlchemy, Prisma, Diesel, tokio-postgres, and more.

GUI Tools

DBeaver and pgAdmin connect directly. Configure as a PostgreSQL connection to localhost:6432.

View page sourceLast updated on Jul 8, 2026 by Farhan Syah