<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MongoDB on Mimus</title><link>https://mimus.pgsty.com/docs/mongo/</link><description>Recent content in MongoDB on Mimus</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 06 Dec 2026 15:37:05 +0800</lastBuildDate><atom:link href="https://mimus.pgsty.com/docs/mongo/index.xml" rel="self" type="application/rss+xml"/><item><title>Compatibility</title><link>https://mimus.pgsty.com/docs/mongo/compatibility/</link><guid>https://mimus.pgsty.com/docs/mongo/compatibility/</guid><description>&lt;p&gt;This page describes the earlier PG18 stack. DocumentDB and its wire-protocol gateway implement different parts of MongoDB compatibility. The FerretDB and DocumentDB versions below belong to that upstream environment. The 19.0.1-r4 checks used the standalone DocumentDB gateway. &lt;a href="https://mimus.pgsty.com/docs/concepts/architecture/#documentdb"&gt;Current verification scope&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;For the authoritative, version-specific command and operator matrices, consult the upstream documentation:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;DocumentDB (&lt;code&gt;v1.0-0&lt;/code&gt;)&lt;/strong&gt;: &lt;a href="https://github.com/documentdb/documentdb"&gt;github.com/documentdb/documentdb&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;FerretDB (&lt;code&gt;v2.7.0&lt;/code&gt;)&lt;/strong&gt;: &lt;a href="https://docs.ferretdb.io/"&gt;docs.ferretdb.io&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="layers"&gt;What each layer covers&#10;&lt;/h2&gt;&#10;&lt;div class="td-table-scroll td-table-scroll--static"&gt;&#10;&lt;table class="wide td-table--wide"&gt;&#10; &lt;thead&gt;&#10; &lt;tr&gt;&#10; &lt;th scope="col"&gt;Layer&lt;/th&gt;&#10; &lt;th scope="col"&gt;Component&lt;/th&gt;&#10; &lt;th scope="col"&gt;Compatibility responsibility&lt;/th&gt;&#10; &lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Wire protocol and session handling&lt;/td&gt;&#10; &lt;td&gt;FerretDB (&lt;code&gt;2.7.0&lt;/code&gt;) or DocumentDB gateway&lt;/td&gt;&#10; &lt;td&gt;MongoDB wire framing (&lt;code&gt;OP_MSG&lt;/code&gt;), driver handshakes (&lt;code&gt;hello&lt;/code&gt; / &lt;code&gt;isMaster&lt;/code&gt;), connection pooling, wire-level authentication and translation of client commands into SQL calls&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;BSON storage, operators and indexing&lt;/td&gt;&#10; &lt;td&gt;&lt;code&gt;documentdb&lt;/code&gt; (&lt;code&gt;1.0-0&lt;/code&gt;), &lt;code&gt;documentdb_core&lt;/code&gt;, &lt;code&gt;documentdb_extended_rum&lt;/code&gt;&lt;/td&gt;&#10; &lt;td&gt;BSON binary type (&lt;code&gt;documentdb_core.bson&lt;/code&gt;), comparison and numeric rules, collection CRUD, aggregation pipeline execution, RUM path indexing, geospatial (&lt;code&gt;postgis&lt;/code&gt;), vector (&lt;code&gt;pgvector&lt;/code&gt;) and full-text queries&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;h2 id="capabilities"&gt;Capabilities in the packaged DocumentDB 1.0 stack&#10;&lt;/h2&gt;&#10;&lt;p&gt;Based on the DocumentDB &lt;code&gt;1.0-0&lt;/code&gt; PostgreSQL packages shipped by PGDG and Pigsty (for PostgreSQL 15–18):&lt;/p&gt;</description></item><item><title>Try it with Pigsty</title><link>https://mimus.pgsty.com/docs/mongo/quickstart/</link><guid>https://mimus.pgsty.com/docs/mongo/quickstart/</guid><description>&lt;p&gt;This example uses the &lt;a href="https://pigsty.io/docs/conf/mongo/"&gt;Pigsty &lt;code&gt;mongo&lt;/code&gt; template&lt;/a&gt; and FerretDB from the earlier PG18 study. The configuration was &lt;code&gt;conf/mongo.yml&lt;/code&gt; in Pigsty v4.5.0 and &lt;code&gt;conf/fork/mongo.yml&lt;/code&gt; in its development sources at the time. &lt;a href="https://mimus.pgsty.com/docs/concepts/architecture/#documentdb"&gt;Single-node Mimus 19.0.1 results&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="single-node"&gt;Single-node deployment&#10;&lt;/h2&gt;&#10;&lt;p&gt;The default &lt;code&gt;mongo&lt;/code&gt; template deploys PostgreSQL 18, the &lt;code&gt;documentdb&lt;/code&gt; extension stack and a local FerretDB container on a single node (&lt;code&gt;10.10.10.10&lt;/code&gt;):&lt;/p&gt;&#10;&lt;ol class="steps"&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Configure and deploy the PostgreSQL cluster, then install Docker and launch the &lt;code&gt;ferretdb&lt;/code&gt; application container on the &lt;code&gt;pg-meta&lt;/code&gt; node:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-750921b0-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="4"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-750921b0-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./configure -c mongo&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./deploy.yml&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./docker.yml -l pg-meta&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./app.yml -l pg-meta&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Connect from &lt;code&gt;mongosh&lt;/code&gt; or any MongoDB driver to the local loopback listener on port &lt;code&gt;27017&lt;/code&gt; using the backend PostgreSQL user created by the template:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-750921b0-fence-1" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-750921b0-fence-1-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mongosh &lt;span class="s1"&gt;&amp;#39;mongodb://mongod:&amp;lt;password&amp;gt;@127.0.0.1:27017/&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;</description></item><item><title>DocumentDB and the gateway</title><link>https://mimus.pgsty.com/docs/mongo/architecture/</link><guid>https://mimus.pgsty.com/docs/mongo/architecture/</guid><description>&lt;p&gt;Unlike SQL Server or MySQL, MongoDB support on PostgreSQL is a &lt;strong&gt;service API protocol&lt;/strong&gt; (see &lt;a href="https://mimus.pgsty.com/docs/concepts/architecture/#protocol-classes"&gt;Architecture&lt;/a&gt;): it needs no kernel patch and no PostgreSQL fork. A stateless gateway listens on TCP port &lt;code&gt;27017&lt;/code&gt;, speaks the MongoDB wire protocol to drivers and &lt;code&gt;mongosh&lt;/code&gt;, and translates each operation into SQL function calls against the &lt;strong&gt;DocumentDB&lt;/strong&gt; extensions running inside stock PostgreSQL.&lt;/p&gt;&#10;&lt;p&gt;This architecture describes the Pigsty stack used in the earlier PG18 study. The Debian 13 amd64 r4 candidate exercised DocumentDB’s own gateway on a single node. &lt;a href="https://mimus.pgsty.com/docs/concepts/architecture/#documentdb"&gt;r4 verification scope&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>