<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Design on Mimus</title><link>https://mimus.pgsty.com/docs/s3/design/</link><description>Recent content in Design 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/s3/design/index.xml" rel="self" type="application/rss+xml"/><item><title>MVP goal</title><link>https://mimus.pgsty.com/docs/s3/design/mvp-goal/</link><guid>https://mimus.pgsty.com/docs/s3/design/mvp-goal/</guid><description>&lt;div class="td-fields"&gt;&#10;&lt;dl class="td-fields__list"&gt;&#10;&lt;div class="td-field"&gt;&#10;&lt;dt class="td-field__term"&gt;&lt;code class="td-field__name"&gt;Date&lt;/code&gt;&#10;&lt;/dt&gt;&#10;&lt;dd class="td-field__description"&gt;2026-11-08, approved by the user&lt;/dd&gt;&#10;&lt;/div&gt;&#10;&lt;div class="td-field"&gt;&#10;&lt;dt class="td-field__term"&gt;&lt;code class="td-field__name"&gt;Applies to&lt;/code&gt;&#10;&lt;/dt&gt;&#10;&lt;dd class="td-field__description"&gt;Silo branch &lt;code&gt;feat/pg-backend&lt;/code&gt; from &lt;code&gt;299378b&lt;/code&gt; onward; current candidate &lt;code&gt;1d387725c&lt;/code&gt;&lt;/dd&gt;&#10;&lt;/div&gt;&#10;&lt;div class="td-field"&gt;&#10;&lt;dt class="td-field__term"&gt;&lt;code class="td-field__name"&gt;Replaces&lt;/code&gt;&#10;&lt;/dt&gt;&#10;&lt;dd class="td-field__description"&gt;The completion criteria of the original development goal (stages 0–5 up to a GA-level release candidate, including a 72-hour endurance run) and the 2026-10-08 local delivery freeze&lt;/dd&gt;&#10;&lt;/div&gt;&#10;&lt;div class="td-field"&gt;&#10;&lt;dt class="td-field__term"&gt;&lt;code class="td-field__name"&gt;Status&lt;/code&gt;&#10;&lt;/dt&gt;&#10;&lt;dd class="td-field__description"&gt;Current&lt;/dd&gt;&#10;&lt;/div&gt;&#10;&lt;/dl&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;h2 id="decision"&gt;Decision&#10;&lt;/h2&gt;&#10;&lt;p&gt;The only completion criterion is an &lt;strong&gt;MVP release candidate&lt;/strong&gt;. When it is reached, work stops and the result is reported; later phases do not start automatically. The stages and the GA-level release candidate of the original goal remain a roadmap after the MVP, not a completion criterion.&lt;/p&gt;</description></item><item><title>Status review and baseline, 2026-11-08</title><link>https://mimus.pgsty.com/docs/s3/design/review-2026-11-08/</link><guid>https://mimus.pgsty.com/docs/s3/design/review-2026-11-08/</guid><description>&lt;div class="td-fields"&gt;&#10;&lt;dl class="td-fields__list"&gt;&#10;&lt;div class="td-field"&gt;&#10;&lt;dt class="td-field__term"&gt;&lt;code class="td-field__name"&gt;Date&lt;/code&gt;&#10;&lt;/dt&gt;&#10;&lt;dd class="td-field__description"&gt;2026-11-08&lt;/dd&gt;&#10;&lt;/div&gt;&#10;&lt;div class="td-field"&gt;&#10;&lt;dt class="td-field__term"&gt;&lt;code class="td-field__name"&gt;Applies to&lt;/code&gt;&#10;&lt;/dt&gt;&#10;&lt;dd class="td-field__description"&gt;Frozen local delivery &lt;code&gt;3c7fdc03&lt;/code&gt;; baseline on &lt;code&gt;299378b&lt;/code&gt;; fixes up to &lt;code&gt;1d387725c&lt;/code&gt; (all on Silo branch &lt;code&gt;feat/pg-backend&lt;/code&gt;, not pushed)&lt;/dd&gt;&#10;&lt;/div&gt;&#10;&lt;div class="td-field"&gt;&#10;&lt;dt class="td-field__term"&gt;&lt;code class="td-field__name"&gt;Finding&lt;/code&gt;&#10;&lt;/dt&gt;&#10;&lt;dd class="td-field__description"&gt;The feature scope was broad and well tested in October, but the evidence was split across candidates and the current source had never run. A GA-level gate set had kept testing open.&lt;/dd&gt;&#10;&lt;/div&gt;&#10;&lt;div class="td-field"&gt;&#10;&lt;dt class="td-field__term"&gt;&lt;code class="td-field__name"&gt;Led to&lt;/code&gt;&#10;&lt;/dt&gt;&#10;&lt;dd class="td-field__description"&gt;&lt;a href="https://mimus.pgsty.com/docs/s3/design/mvp-goal/"&gt;MVP goal&lt;/a&gt;&lt;/dd&gt;&#10;&lt;/div&gt;&#10;&lt;div class="td-field"&gt;&#10;&lt;dt class="td-field__term"&gt;&lt;code class="td-field__name"&gt;Replaces&lt;/code&gt;&#10;&lt;/dt&gt;&#10;&lt;dd class="td-field__description"&gt;Nothing; this is a review record&lt;/dd&gt;&#10;&lt;/div&gt;&#10;&lt;/dl&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;h2 id="state"&gt;State before the review&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Candidate identity was split.&lt;/strong&gt; No single commit carried complete runtime evidence:&lt;/p&gt;</description></item><item><title>Lifecycle and Object Lock</title><link>https://mimus.pgsty.com/docs/s3/design/lifecycle-lock/</link><guid>https://mimus.pgsty.com/docs/s3/design/lifecycle-lock/</guid><description>&lt;div class="td-callout td-callout--note" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-circle-info" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Note&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;Object Lock (&lt;code&gt;GOVERNANCE&lt;/code&gt; / &lt;code&gt;COMPLIANCE&lt;/code&gt; retention and legal hold) and bucket lifecycle rules (version expiration, expired delete-marker cleanup, and incomplete multipart upload abort) are &lt;strong&gt;Preview&lt;/strong&gt; features in the MVP release.&lt;/p&gt;&#10; &lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;In Silo&amp;rsquo;s erasure-coded backend, lifecycle expiration and Object Lock checks rely on the distributed disk scanner (&lt;code&gt;NSScanner&lt;/code&gt;), in-memory expiry queues, and handler-level pre-checks. Directly enabling those paths on a shared PostgreSQL backend would fail in four ways:&lt;/p&gt;</description></item><item><title>IAM control plane</title><link>https://mimus.pgsty.com/docs/s3/design/iam-control-plane/</link><guid>https://mimus.pgsty.com/docs/s3/design/iam-control-plane/</guid><description>&lt;p&gt;In a multi-gateway &lt;code&gt;pgsilo&lt;/code&gt; deployment, gateways cache IAM users, groups, policies, service accounts, STS sessions, and bucket metadata in memory so ordinary S3 requests do not query &lt;code&gt;.minio.sys&lt;/code&gt; tables on every packet. However, an unbounded or loosely synchronized cache creates a security gap: a revoked credential or deleted policy could remain usable on another gateway for minutes.&lt;/p&gt;&#10;&lt;p&gt;This page explains how &lt;code&gt;pgsilo&lt;/code&gt; bounds IAM and control-plane cache staleness to &lt;strong&gt;5 seconds&lt;/strong&gt;, isolates control traffic from slow object streams, validates standby gateways, and prevents split-brain cache renewal after asynchronous PostgreSQL failover (&lt;code&gt;schema 14&lt;/code&gt;).&lt;/p&gt;</description></item><item><title>SQL API design</title><link>https://mimus.pgsty.com/docs/s3/design/sql-api/</link><guid>https://mimus.pgsty.com/docs/s3/design/sql-api/</guid><description>&lt;div class="td-callout td-callout--note" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-circle-info" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Note&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;The public &lt;code&gt;silo_api&lt;/code&gt; SQL interface and &lt;code&gt;silo_bucket&lt;/code&gt; ACL relations are &lt;strong&gt;Preview&lt;/strong&gt; features in the MVP release.&lt;/p&gt;&#10; &lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;Storing objects inside PostgreSQL unlocks a capability that external object stores cannot provide: applications can read, write, copy, and delete S3 objects inside the same &lt;code&gt;Read Committed&lt;/code&gt; SQL transaction as ordinary relational tables. This page explains how &lt;code&gt;pgsilo&lt;/code&gt; exposes that SQL interface without compromising the internal version state machine or tenant isolation.&lt;/p&gt;</description></item><item><title>Integration with Silo</title><link>https://mimus.pgsty.com/docs/s3/design/silo-integration/</link><guid>https://mimus.pgsty.com/docs/s3/design/silo-integration/</guid><description>&lt;p&gt;Replacing the &lt;code&gt;newObjectLayer()&lt;/code&gt; constructor in Silo is only the first step of integrating a PostgreSQL backend. Although Silo routes object and configuration storage through &lt;code&gt;ObjectLayer&lt;/code&gt;, several startup routines, background workers, HTTP handlers, and IAM entry points in &lt;code&gt;cmd/&lt;/code&gt; implicitly assume a distributed erasure-coded (&lt;code&gt;erasureServerPools&lt;/code&gt;) deployment.&lt;/p&gt;&#10;&lt;p&gt;This page documents the coupling points identified during the Stage 0 source audit and how &lt;code&gt;pgsilo&lt;/code&gt; resolves each one without breaking erasure-coded mode.&lt;/p&gt;&#10;&lt;h2 id="startup-and-budgets"&gt;Startup, DSN parsing, and concurrency budgets&#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;Subsystem in &lt;code&gt;cmd/&lt;/code&gt;&lt;/th&gt;&#10; &lt;th scope="col"&gt;Original erasure-coded assumption&lt;/th&gt;&#10; &lt;th scope="col"&gt;PostgreSQL backend adaptation&lt;/th&gt;&#10; &lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Command-line / env argument parsing (&lt;code&gt;server-main.go&lt;/code&gt;, &lt;code&gt;common-main.go&lt;/code&gt;)&lt;/td&gt;&#10; &lt;td&gt;Requires positional disk directory arguments or &lt;code&gt;MINIO_VOLUMES&lt;/code&gt;; normalizes arguments as filesystem paths&lt;/td&gt;&#10; &lt;td&gt;Detects &lt;code&gt;SILO_PG_DSN&lt;/code&gt; or a single &lt;code&gt;postgres://&lt;/code&gt; / &lt;code&gt;postgresql://&lt;/code&gt; URI before disk parsing; rejects mixing disk paths with PostgreSQL mode; redacts DSN passwords from debug output&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Peer RPC grid (&lt;code&gt;grid.go&lt;/code&gt;, &lt;code&gt;internal/grid&lt;/code&gt;)&lt;/td&gt;&#10; &lt;td&gt;Unconditionally initializes peer-to-peer WebSocket grids and distributed lock grids across &lt;code&gt;globalEndpoints&lt;/code&gt;&lt;/td&gt;&#10; &lt;td&gt;Skips &lt;code&gt;grid&lt;/code&gt; and &lt;code&gt;lock-grid&lt;/code&gt; initialization when &lt;code&gt;globalIsPGBackend&lt;/code&gt; is set; gateways coordinate solely through PostgreSQL transactions and &lt;code&gt;LISTEN/NOTIFY&lt;/code&gt;&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Default request concurrency (&lt;code&gt;handler-api.go: apiConfig.init&lt;/code&gt;)&lt;/td&gt;&#10; &lt;td&gt;When &lt;code&gt;api requests_max &amp;lt;= 0&lt;/code&gt;, computes memory limits using &lt;code&gt;slices.Max(setDriveCounts)&lt;/code&gt;—which &lt;strong&gt;panics&lt;/strong&gt; on an empty drive-count slice in PostgreSQL mode&lt;/td&gt;&#10; &lt;td&gt;Bounds concurrent S3 requests by &lt;code&gt;min(SILO_PG_MAX_CONNS, memlimit / (2 * SILO_PG_SEGMENT_SIZE), api requests_max)&lt;/code&gt; coupled with the &lt;code&gt;SILO_PG_QUEUE_TIMEOUT&lt;/code&gt; admission queue&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Bucket metadata batch loader (&lt;code&gt;bucket-metadata-sys.go&lt;/code&gt;)&lt;/td&gt;&#10; &lt;td&gt;Computes batch step as &lt;code&gt;globalEndpoints.ESCount() * 10&lt;/code&gt;, causing an infinite &lt;code&gt;0&lt;/code&gt;-step loop when &lt;code&gt;ESCount() == 0&lt;/code&gt;&lt;/td&gt;&#10; &lt;td&gt;Enforces &lt;code&gt;max(1, ...)&lt;/code&gt; batch sizing so empty and non-empty bucket catalogs load cleanly on startup&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Deployment identity and readiness (&lt;code&gt;erasure-server-pool.go&lt;/code&gt;, &lt;code&gt;server-main.go&lt;/code&gt;)&lt;/td&gt;&#10; &lt;td&gt;Generates deployment UUID inside &lt;code&gt;newErasureServerPools&lt;/code&gt; and logs single-drive parity warnings&lt;/td&gt;&#10; &lt;td&gt;Persists a stable &lt;code&gt;deployment_id&lt;/code&gt; in &lt;code&gt;silo.meta&lt;/code&gt;, publishes &lt;code&gt;setObjectLayer&lt;/code&gt; after schema check/migration, suppresses erasure parity warnings, and separates &lt;code&gt;/minio/health/cluster/read&lt;/code&gt; from &lt;code&gt;/minio/health/cluster&lt;/code&gt;&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;h2 id="type-assertions"&gt;Guarding the 20 &lt;code&gt;.(*erasureServerPools)&lt;/code&gt; type assertions&#10;&lt;/h2&gt;&#10;&lt;p&gt;A static audit of &lt;code&gt;cmd/&lt;/code&gt; found 20 &lt;code&gt;.(*erasureServerPools)&lt;/code&gt; type assertions across 9 files (&lt;code&gt;admin-handlers-pools.go&lt;/code&gt;, &lt;code&gt;admin-handlers.go&lt;/code&gt;, &lt;code&gt;background-newdisks-heal-ops.go&lt;/code&gt;, &lt;code&gt;data-usage.go&lt;/code&gt;, &lt;code&gt;erasure-multipart-listing.go&lt;/code&gt;, &lt;code&gt;global-heal.go&lt;/code&gt;, &lt;code&gt;notification.go&lt;/code&gt;, &lt;code&gt;peer-rest-server.go&lt;/code&gt;, and &lt;code&gt;site-replication.go&lt;/code&gt;), plus several non-assertion handlers that reference erasure-only state:&lt;/p&gt;</description></item><item><title>Design decisions</title><link>https://mimus.pgsty.com/docs/s3/design/decisions/</link><guid>https://mimus.pgsty.com/docs/s3/design/decisions/</guid><description>&lt;p&gt;This page summarizes the core architectural decisions behind &lt;code&gt;pgsilo&lt;/code&gt;, including how initial design assumptions were refined during implementation and verification.&lt;/p&gt;&#10;&lt;h2 id="objectlayer-seam"&gt;1. The &lt;code&gt;ObjectLayer&lt;/code&gt; seam&#10;&lt;/h2&gt;&#10;&lt;p&gt;Silo&amp;rsquo;s architecture separates HTTP request parsing, SigV4 authentication, and XML serialization (&lt;code&gt;cmd/&lt;/code&gt;) from storage operations via the &lt;code&gt;ObjectLayer&lt;/code&gt; interface (&lt;code&gt;44&lt;/code&gt; methods). Below &lt;code&gt;ObjectLayer&lt;/code&gt;, the erasure-coded backend uses &lt;code&gt;StorageAPI&lt;/code&gt; to read and write reed-solomon shards and binary &lt;code&gt;xl.meta&lt;/code&gt; files across disks.&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;pgsilo&lt;/code&gt; implements &lt;code&gt;ObjectLayer&lt;/code&gt; directly (&lt;code&gt;internal/pgstore&lt;/code&gt; + &lt;code&gt;cmd/object-api-pg*.go&lt;/code&gt;) rather than &lt;code&gt;StorageAPI&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>Why a PostgreSQL backend</title><link>https://mimus.pgsty.com/docs/s3/design/why/</link><guid>https://mimus.pgsty.com/docs/s3/design/why/</guid><description>&lt;p&gt;Many small-to-medium applications already run a managed or high-availability PostgreSQL cluster, yet still need an S3 endpoint for user attachments, avatars, PDF exports, or CI artifacts. Running a separate object storage cluster splits operational state across two systems: backups, point-in-time recovery (PITR), database clones, and access control must be coordinated twice and can drift apart.&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;pgsilo&lt;/code&gt; solves this by adding a PostgreSQL &lt;code&gt;ObjectLayer&lt;/code&gt; backend to &lt;strong&gt;Silo&lt;/strong&gt; (PGSTY&amp;rsquo;s fork of MinIO), storing all object data, versions, bucket configurations, multipart uploads, and IAM state inside a single PostgreSQL database.&lt;/p&gt;</description></item></channel></rss>