Skip to content

This is the multi-page printable view of this section.

Return to the regular view of this page

Concepts & Architecture

Why Mimus unifies session wire hooks, stateless service gateways, encryption, replication and extensions on one PostgreSQL 19.0 kernel.

Mimus starts from a simple premise: instead of operating separate data silos for relational, MySQL, MSSQL, document, key-value, coordination and object workloads, let every client protocol read and write one PostgreSQL 19.0 storage engine.

Three layers of design

  • Wire protocols decide how clients connect: session protocols (PostgreSQL :5432, MySQL :3306, MSSQL :1433) attach directly to backend processes via thin kernel hooks, while high-concurrency service protocols (MongoDB :27017, Redis :6379, etcd :2379, S3 :9000) enter through stateless multiplexing gateways.
  • Dialects decide what clients speak once connected: PostgreSQL SQL, MySQL SQL (pg_mysql), T-SQL (Babelfish), BSON queries (DocumentDB), and Oracle compatibility helpers (orafce) load as extensions.
  • Engine capabilities protect, replicate and enrich shared MVCC tables: transparent relation and WAL encryption (PG TDE), active-active logical replication (pgEdge), spatial indexing (PostGIS), vector search (pgvector, VectorChord), and native PostgreSQL 19 REPACK.

Continue below for the detailed connection path and deployment boundaries.

1 - Unified kernel, protocol hooks and gateways

How session wire hooks and stateless service gateways converge on PostgreSQL 19.0 tables, encryption and replication.

Two classes of wire protocols

PostgreSQL runs one backend process per client connection. Mimus therefore separates wire protocols into two classes so only stateful database sessions touch the kernel:

DimensionSession database protocolsService API protocols
ProtocolsPostgreSQL (5432), MySQL (3306), MSSQL (1433)MongoDB (27017), Redis (6379), etcd (2379), S3 (9000)
Connection shapeStateful session: transactions, session GUCs, temp tables, SQL dialectThousands of pooled requests, long-lived watches, HTTP/gRPC/RESP streams
Entry pathPostmaster hands the socket to a backend process driven by an extension hookStateless external gateway multiplexes client sockets onto a small SQL pool
Kernel patchesYes: OpenHalo protocol hook (300/301) and Babelfish TDS/T-SQL (400/401)None required: data models and transactional semantics live in SQL/C extensions

From connection to physical table

Mimus 19.0.1 kernel stack: native PostgreSQL 5432 and one session compatibility listener over nine PostgreSQL 19.0 patch layers with PG TDE and pgEdge SpockMimus 19.0.1 kernel stack: native PostgreSQL 5432 and one session compatibility listener over nine PostgreSQL 19.0 patch layers with PG TDE and pgEdge Spock

Every Mimus instance accepts native PostgreSQL connections on port 5432. Adding pg_mysql opens MySQL wire connections; adding babelfishpg_tds and its companion T-SQL extensions opens MSSQL TDS connections. Each compatibility listener maps logical databases onto PostgreSQL schemas so administrators can inspect physical tables, roles, indexes and backups directly from psql.

Choose at most one compatibility protocol per instance (MySQL, MSSQL, or MongoDB). All databases inside one PGDATA directory share server processes and shared_preload_libraries. Workloads needing both MySQL and MSSQL run on two separate instances.

Single-node MongoDB gateway

In 19.0.1-r4 acceptance on Debian 13 amd64, Mimus verified single-node DocumentDB 1.2 paired with its standalone MongoDB wire gateway (27017). MongoDB drivers connect to the gateway while BSON documents live inside PostgreSQL tables managed via 5432. Both logical restore strategies—excluding cron via pg_restore -N cron, or pausing pg_cron, replacing default jobs in one transaction, and restoring full job history—returned all 63 documents under the original collection name in PyMongo checks.

Storage, replication and extensions

pg_tde encrypts relation pages, indexes, TOAST tables and WAL locally on disk; spock replicates logical row changes across writable nodes; extensions such as PostGIS, pgvector, VectorChord, orafce and pg_cron operate on the same catalog and storage engine. When combining encrypted storage with bidirectional replication, configure a key provider and create encrypted relations on each node independently. See the Kernel Patch Manifest for layer-by-layer patch boundaries.

2 - Isolation rules, feature locks and exclusions

Why Mimus isolates one compatibility protocol per instance, guards cluster startup with mimus_required_features, and excludes conflicting forks.

One compatibility listener per instance

Although a Mimus binary built through patch layer 401 contains the kernel hooks for both OpenHalo (MySQL) and Babelfish (MSSQL), each running PGDATA cluster enables at most one compatibility protocol alongside native PostgreSQL (5432).

  • shared_preload_libraries, background workers, parser hooks, and custom GUC namespaces apply across the entire PostgreSQL instance.
  • Isolating one compatibility listener per instance keeps parser dispatch, catalog resolution, connection limits, and failover runbooks predictable. Note that this rule is a product support boundary rather than a hard startup error.

Data-directory feature locks

A plain community PostgreSQL 19.0 data directory can start on Mimus, and an unused Mimus directory with mimus_required_features = '' can be handed back to stock PostgreSQL 19.0 (verified across 36/36 handoff checks in 19.0.1-r4).

Once an instance activates transparent encryption (tde), MySQL catalog objects, Babelfish catalogs, or Spock conflict metadata, Patch 000 records that dependency persistently for the cluster. On subsequent startups or WAL recovery, Mimus verifies that the required preload modules and hooks are present before opening relations or replaying records—preventing silent corruption or unreadable ciphertext errors mid-query.

Hard exclusions and out-of-scope forks

To preserve storage reliability and crash safety, several upstream PostgreSQL forks and extensions are explicitly excluded from Mimus:

ProjectReason for exclusionRecommended alternative
CitusIncompatible with Percona’s pg_tde kernel storage hooks even when pg_tde is disabled; DocumentDB’s distributed Citus module is likewise excludedRun Citus on a dedicated stock PostgreSQL cluster
TimescaleDBConflicts with pg_tde kernel storage paths regardless of whether encryption is enabledRun TimescaleDB on a dedicated stock PostgreSQL cluster
OrioleDBAlters table and index access method signatures across the storage engineUse separate OrioleDB builds outside Mimus
IvorySQL / Oracle wireOracle’s TNS wire protocol has no open-source implementation, and IvorySQL modifies core system catalogsUse the orafce extension for Oracle SQL functions and packages
External pg_repackRewrites tde_heap relations into unencrypted heap pages without errorUse PostgreSQL 19’s built-in REPACK command