Skip to content

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

Return to the regular view of this page

Operations

Install, run highly available, back up, upgrade, monitor and troubleshoot.

pgsilo gateways serve the S3 API, web Console, and IAM evaluation while PostgreSQL stores all objects, segments, and control state. Operate and monitor both layers together: a live gateway process does not prove that PostgreSQL is writable, and logical bucket usage does not measure physical database disk consumption.

Operations guides

TaskGuide
Prepare PostgreSQL and install gateways on Linux or macOSInstall
Scale out stateless gateways, attach read-only standbys, and handle failoverHigh availability
Back up and restore the database, WAL stream, and external encryption keysBackup and restore
Perform coordinated schema migrations and binary upgradesUpgrade
Configure health probes, scrape /minio/metrics/v3/pg, and track capacityMonitoring
Diagnose TLS, pool exhaustion (HTTP 503 / 429), IAM leases, and space growthTroubleshooting
Automate multi-gateway deployment with the unpublished Pigsty role branchDeploy with Pigsty

Operating rules

  • All gateways in a deployment must connect to the same logical PostgreSQL database (or its physical standbys) and share identical root credentials, effective region, static SSE-S3 keys, SILO_PG_SEGMENT_SIZE, and SILO_PG_MAX_OBJECT_SIZE.
  • Gateways connect as the trusted ordinary database owner (silo_owner). Applications use separate SQL logins (app_sql) with access only to silo_api and silo_bucket, never the private silo schema.
  • Even if applications access objects exclusively through silo_api over SQL, keep at least one writable silo server gateway connected to the PostgreSQL primary. That gateway runs lifecycle expiration, reaps unlinked annotation payloads, and writes the control-plane heartbeats required by standby gateways.
  • During recovery or failover, evaluate consistency at the transaction boundary: application rows and silo_api calls inside one SQL transaction recover atomically, whereas separate S3 HTTP requests commit as independent transactions.

1 - Install

Database preparation and installation on Linux and macOS.
Important

Installation packages for the pgsilo PostgreSQL backend have not yet been publicly released (MVP in progress). No public download URLs exist yet. When released with Silo, the MVP targets linux/amd64 and linux/arm64 DEB and RPM packages (darwin/arm64 is used for local verification). The frozen October 8, 2026 local checkpoint (3c7fdc03) built only linux/arm64 DEB and darwin/arm64 artifacts.

This guide covers preparing the PostgreSQL database and configuring silo server on Linux (systemd) or macOS. For an existing database undergoing a schema change, follow Upgrade instead.

1. Prepare the PostgreSQL database

Prepare a PostgreSQL 16 or newer primary instance (pg.example.net:5432) with TLS enabled. Gateways must connect directly to PostgreSQL or through a session-preserving proxy; do not route SILO_PG_DSN through PgBouncer in transaction-pooling mode.

On the PostgreSQL primary, create an ordinary, non-superuser role (silo_owner) and a dedicated database (silo):

CREATE ROLE silo_owner LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION;
\password silo_owner
CREATE DATABASE silo OWNER silo_owner;

Require TLS and SCRAM authentication in pg_hba.conf for the gateway subnet:

hostssl silo silo_owner 192.0.2.0/24 scram-sha-256

From the gateway host, verify connectivity, TLS certificate verification (sslmode=verify-full), and primary write status (pg_is_in_recovery() = false):

psql 'host=pg.example.net port=5432 dbname=silo user=silo_owner sslmode=verify-full sslrootcert=/path/to/pg-ca.crt' \
  -W -c 'SELECT current_user, current_database(), pg_is_in_recovery();'

2. Install on Linux with systemd

Install the package and verify the binary

Once you have built or obtained the target DEB/RPM package for your architecture (amd64 or arm64), verify its SHA-256 checksum and install it:

sha256sum -c SHA256SUMS
sudo dpkg -i ./silo_<version>_<arch>.deb
sha256sum /usr/bin/silo

The package creates the silo system user and group. Complete the configuration steps below before starting the service.

Install TLS certificates and /etc/default/silo

Create /etc/silo and /etc/silo/certs, install the PostgreSQL CA certificate and the S3 server TLS certificate/key pair (public.crt and private.key), and create /etc/default/silo:

sudo install -d -o root -g silo -m 0750 /etc/silo /etc/silo/certs
sudo install -o root -g silo -m 0640 /path/to/pg-ca.crt /etc/silo/postgres-ca.crt
sudo install -o root -g silo -m 0640 /path/to/s3-server.crt /etc/silo/certs/public.crt
sudo install -o root -g silo -m 0640 /path/to/s3-server.key /etc/silo/certs/private.key

Write /etc/default/silo (mode 0640, owned by root:silo) using this template (silo-pg.env.example), replacing all placeholder values:

SILO_PG_DSN="postgresql://silo_owner:[email protected]:5432/silo?sslmode=verify-full&sslrootcert=/etc/silo/postgres-ca.crt"
MINIO_ROOT_USER="REPLACE_WITH_ROOT_ACCESS_KEY"
MINIO_ROOT_PASSWORD="REPLACE_WITH_LONG_RANDOM_SECRET"
MINIO_REGION="us-east-1"
SILO_PG_READ_ONLY="off"
SILO_PG_MAX_CONNS="32"
SILO_PG_CONTROL_CONNS="4"
SILO_PG_COORD_CONNS="2"
SILO_PG_SEGMENT_SIZE="8MiB"
SILO_PG_MAX_OBJECT_SIZE="256MiB"
SILO_PG_ACQUIRE_TIMEOUT="5s"
SILO_PG_REQUEST_TIMEOUT="15m"
SILO_PG_QUEUE_TIMEOUT="5s"

SILO_PG_QUEUE_TIMEOUT takes effect from 1d387725c (2026-11-08); earlier builds ignore it.

Percent-encode reserved characters in the DSN password. This file is read by systemd EnvironmentFile; do not execute it with source.

Install the systemd drop-in and start silo

Install the service override (/etc/systemd/system/silo.service.d/postgresql.conf, matching silo-pg.conf) so systemd clears any default disk-mode arguments and starts silo server in PostgreSQL mode:

[Service]
EnvironmentFile=
EnvironmentFile=/etc/default/silo
ExecStart=
ExecStart=/usr/bin/silo server --address :9000 --console-address :9001 --certs-dir /etc/silo/certs

Reload systemd and start the first writable gateway:

sudo systemctl daemon-reload
sudo systemctl enable --now silo
sudo systemctl status silo --no-pager
sudo journalctl -u silo -n 100 --no-pager

On first startup against an empty database, the writable gateway initializes schema 14 (migrations 0001 through 0014) inside a transaction and persists SILO_PG_SEGMENT_SIZE and SILO_PG_MAX_OBJECT_SIZE. Wait for initialization to finish before starting additional gateways.

3. Run on macOS (Apple Silicon)

For local verification on Apple Silicon (darwin/arm64), place public.crt and private.key in your certificate directory and launch ./silo-darwin-arm64 with environment variables prompted interactively so secrets stay out of shell history:

chmod +x ./silo-darwin-arm64
read -r -s -p 'PostgreSQL DSN: ' SILO_PG_DSN; printf '\n'
read -r -p 'Root access key: ' MINIO_ROOT_USER
read -r -s -p 'Root secret key: ' MINIO_ROOT_PASSWORD; printf '\n'
export SILO_PG_DSN MINIO_ROOT_USER MINIO_ROOT_PASSWORD
export SILO_PG_READ_ONLY=off MINIO_REGION=us-east-1
./silo-darwin-arm64 server --address :9000 --console-address :9001 --certs-dir /path/to/certs

4. Verify database-aware health checks

From a client trusting the S3 TLS CA, verify both read and write health endpoints:

curl --fail --cacert /path/to/s3-ca.crt https://s3.example.net:9000/minio/health/cluster/read
curl --fail --cacert /path/to/s3-ca.crt https://s3.example.net:9000/minio/health/cluster

A healthy writable gateway returns HTTP 200 on both endpoints. Next, follow the Quickstart or SDK & CLI Access to create application credentials and buckets.

2 - High availability

Several stateless gateways, standby gateways and PostgreSQL failover.
Note

Running multiple stateless read-write gateways against a single PostgreSQL primary is part of the core pgsilo MVP. Read-only hot standby gateways (SILO_PG_READ_ONLY=on) connected to physical PostgreSQL standbys are a Preview feature. pgsilo does not provide automatic database failover, old-primary fencing, or zero-RPO guarantees; persistence, replication, and failover are governed by your PostgreSQL HA cluster.

Because pgsilo gateways hold no local object files on disk, multiple gateways can share one PostgreSQL primary while PostgreSQL physical replication protects the underlying data.

Add a writable gateway

  1. Install the exact same silo binary build on the new gateway host.
  2. Point SILO_PG_DSN to the same PostgreSQL primary database (silo) and owner (silo_owner). Use identical root credentials, effective region, static SSE-S3 keys, SILO_PG_SEGMENT_SIZE, and SILO_PG_MAX_OBJECT_SIZE.
  3. Install the PostgreSQL CA certificate and S3 TLS certificates covering the gateway’s hostname or load-balancer SANs.
  4. Let the first writable gateway finish schema initialization before starting additional gateways. Verify both /minio/health/cluster/read and /minio/health/cluster return HTTP 200 on the new gateway before adding it to the load balancer’s write pool.

Each gateway opens up to SILO_PG_MAX_CONNS connections (32 by default: 4 control, 2 coordination, and 26 data connections). Two default gateways consume up to 64 PostgreSQL connections before counting application SQL sessions, replication, and administration. Route read-write traffic with /minio/health/cluster and read-only traffic with /minio/health/cluster/read.

Read-only gateways on a physical standby (Preview)

After configuring PostgreSQL physical streaming replication and confirming the standby has replayed schema 14 (migration:0001 through 0014), configure a read-only gateway against the standby endpoint:

SILO_PG_DSN="postgresql://silo_owner:[email protected]:5432/silo?sslmode=verify-full&sslrootcert=/etc/silo/postgres-ca.crt"
SILO_PG_READ_ONLY="on"

A read-only gateway verifies schema compatibility at startup but never initializes, migrates, or runs background maintenance. Even if pointed at a writable primary, SILO_PG_READ_ONLY=on rejects all S3 mutation requests.

Gateway & database state/minio/health/cluster/read/minio/health/clusterMutation behavior
Healthy writable gateway on primary200200Allowed (subject to IAM / native auth)
Healthy explicit read-only gateway (SILO_PG_READ_ONLY=on)200503Rejected with AccessDenied
Writable gateway whose database enters recovery / read-only200 (if readable)503Fails with retryable service/read-only error
Database unreachable503503Fails (process liveness /minio/health/live may remain 200)

Standby reads reflect asynchronous replication lag and can be canceled by PostgreSQL recovery conflicts. Applications requiring read-after-write consistency must read from a primary gateway or coordinate against PostgreSQL LSN replay positions.

IAM cache freshness and the 5-second lease

Gateways authorize S3 requests against an in-memory IAM and bucket-metadata snapshot governed by a strict 5-second lease measured from the start of each database observation query:

  • Gateways poll PostgreSQL every 1 second and also listen on LISTEN silo_control_rev for immediate wakeups. NOTIFY is only a hint; missed notifications never cause permanent staleness.
  • Schema 14 pairs the monotonic integer revision with a persistent random UUID revision_token updated in every control-plane transaction. After a failover, any change in revision_token—or any change in pg_is_in_recovery() state or listener reconnection—forces a full control-plane reload even if the integer revision matches.
  • Until a required reload completes, an unexpired snapshot keeps its existing deadline without renewal; local invalidation revokes the lease immediately. Once the 5-second lease expires without a fresh database observation, IAM-authenticated requests fail closed (503) rather than serving stale permissions.
  • Physical standby gateways verify freshness using replicated control-plane heartbeats written by a writable gateway on the primary. Clocks on the primary and standby hosts must stay synchronized within 500 milliseconds. Heartbeat age plus the 500 ms clock-skew allowance is subtracted from the 5-second lease window. Always keep at least one writable gateway running on the primary so standby heartbeats stay fresh.

For design details, see IAM, Control Plane & Cache Freshness.

PostgreSQL failover sequence

  1. Fence the old primary through your PostgreSQL HA manager (e.g., Patroni) and verify it can no longer accept writes.
  2. Promote the selected standby according to your RPO policy and update the primary DNS/VIP endpoint.
  3. Verify writable gateways reconnect to the promoted primary, observe pg_is_in_recovery() = false, and return HTTP 200 on /minio/health/cluster.
  4. Verify authorization and maintenance: test both allowed and denied S3 requests on every gateway, confirm clock synchronization (<= 500 ms) and heartbeat replication for any remaining standbys, and verify via metrics (minio_pg_lifecycle_leader) that a writable primary gateway has acquired the maintenance lease.
  5. Restore application traffic. Note that revision_token detects split-brain control caches after failover, but it does not fence an old primary or recover object writes lost during asynchronous replication.

3 - Backup and restore

Back up objects and IAM with PostgreSQL tools, and restore them.

Because pgsilo gateways are stateless, backing up the PostgreSQL cluster backs up all objects, versions, multipart parts, annotations, bucket policies, and IAM accounts together. Complete disaster recovery requires a physical PostgreSQL cluster backup, a continuous archived WAL stream, and separately preserved external secrets (especially static SSE-S3 KMS keys).

Preserve the complete recovery set

The PostgreSQL database stores all of the following in transactional consistency:

  • Object byte segments, version metadata, and delete markers
  • Active multipart upload state and uploaded parts
  • Object annotations, annotation payloads, and the orphan cleanup queue
  • Bucket configurations, quotas, Object Lock policies, S3 IAM users/policies/service accounts, and native PostgreSQL role bindings (silo.native_auth_principals)
  • Schema migration ledger (silo.meta) and control-plane revision tokens

Physical backups preserve database tables, role OIDs, and relation OIDs, but you must back up these external items independently:

  • The exact silo binary version and checksums matching the database schema version (schema_version = 14)
  • Gateway environment configuration (/etc/default/silo), S3 root credentials (MINIO_ROOT_USER / MINIO_ROOT_PASSWORD), and every static SSE-S3 master key (MINIO_KMS_SECRET_KEY / MINIO_KMS_SECRET_KEY_FILE) ever used to encrypt retained objects
  • PostgreSQL and S3 TLS certificates, private keys, CA bundles, and webhook notification target credentials
Caution

Never store the only copy of your PostgreSQL backup repository or KMS keys inside the same pgsilo S3 service that depends on the database being backed up. Without the matching static SSE-S3 key or customer SSE-C key, restored encrypted rows in PostgreSQL cannot be decrypted.

Physical backup with pgBackRest

Configure an independent pgBackRest repository, WAL archiving, and retention policy on your PostgreSQL cluster, then verify and run a full physical backup on the database host:

sudo -u postgres pgbackrest --stanza=YOUR_STANZA check
sudo -u postgres pgbackrest --stanza=YOUR_STANZA --type=full backup
sudo -u postgres pgbackrest --stanza=YOUR_STANZA info

Confirm that pgbackrest info reports a valid backup timestamp and continuous WAL archive range.

Rehearse physical restore and PITR

  1. Select the recovery target (timestamp, LSN, or transaction ID) and prepare an isolated PostgreSQL host so the restored cluster does not conflict with production.
  2. Restore the cluster and replay WAL to the target point using pgBackRest. Deploy the silo binary version compatible with the restored schema_version (14).
  3. Install matching external configuration and secrets: restore /etc/default/silo, static MINIO_KMS_SECRET_KEY values, and TLS certificates. Start gateways pointing only at the restored database.
  4. Verify data and authorization:
    • Check plaintext and SSE-S3 object SHA-256 digests, version histories, and delete markers.
    • Verify multipart uploads, object annotations, and ZIP extraction.
    • Test both allowed and denied requests for S3 IAM users and silo_api SQL roles, plus bucket quotas and Object Lock retention.
    • Review any IAM credential revocations or policy changes that occurred after the PITR target timestamp, since point-in-time recovery restores the IAM state as of that earlier timestamp.
  5. Check health and maintenance leases (/minio/health/cluster/read, /minio/health/cluster, and minio_pg_lifecycle_leader) before opening client traffic.

Application rows and silo_api object writes committed in the same SQL transaction recover atomically to the same point in time. Note that PostgreSQL PITR cannot recall webhook notifications already delivered to external endpoints before the rollback point.

Why logical pg_dump is not a drop-in migration

pg_dump exports SQL tables and definitions, but pgsilo records PostgreSQL internal role OIDs and relation OIDs (regclass / oid) inside silo.bucket_acl and silo.native_auth_principals. Restoring a logical dump into a new PostgreSQL cluster assigns different OIDs to roles and ACL tables, breaking native authorization and SQL bucket ACL lookups.

Current pgsilo builds do not include an automated cross-cluster OID remapping utility. Always use physical cluster backup and restore (pgBackRest / pg_basebackup + WAL replay) for full disaster recovery, and never manually edit private OID columns in silo.* tables.

4 - Upgrade

Schema migrations and gateway upgrades.

Upgrading pgsilo across schema versions requires a planned maintenance window. Because a database schema migration does not automatically stop running gateway binaries, never run mixed gateway schema versions concurrently against the same PostgreSQL database.

Coordinated upgrade sequence

  1. Record current versions and take a physical backup: record the running silo binary checksums and schema_version, take a verified physical backup (Backup and restore), and confirm external SSE-S3 KMS keys are backed up.
  2. Stop all gateways and SQL writers: drain client traffic, stop every writable and read-only silo gateway, disable automatic systemd/supervisor restarts, and pause direct silo_api SQL writer jobs. Verify in pg_stat_activity that all gateway sessions have exited.
  3. Install the new binary on all gateway hosts and verify SHA-256 checksums.
  4. Migrate the database from a single writable gateway: start one writable gateway connected to the PostgreSQL primary. On startup, it applies pending migrations inside a transaction as silo_owner. Never attempt schema migration from a read-only gateway.
  5. Verify schema 14 and health endpoints: confirm the first gateway passes /minio/health/cluster/read and /minio/health/cluster, and verify the migration ledger in silo.meta.
  6. Start remaining gateways: start the other writable gateways, wait for physical standbys to replay the schema migration WAL, and then start read-only standby gateways.
  7. Run post-upgrade verification before reopening client traffic: test plaintext and encrypted reads, versions, multipart completion, annotations, ZIP extraction, IAM allow/deny rules, and maintenance lease acquisition (minio_pg_lifecycle_leader).

As silo_owner or a database administrator, inspect the migration ledger with:

SELECT key, value
FROM silo.meta
WHERE key = 'schema_version' OR key LIKE 'migration:%'
ORDER BY key;

In the current build, schema_version must be 14, and entries migration:0001 through migration:0014 must match the SHA-256 migration hashes embedded in the silo binary. Never grant application roles access to silo.meta or manually edit migration rows.

Summary of historical schema versions

Schema versionKey changesCompatibility boundary
Schema 12Added checksum metadata compatibility verification (CRC64NVME, SHA512, XXHASH*)Schema 11 binaries cannot interpret new checksum type bits and are rejected after schema 12 commits
Schema 13Added object annotations, transactional quota counters, copy_object annotation support, and deferred annotation payload cleanupSchema 12 binaries are rejected after schema 13 commits
Schema 14Added persistent random UUID revision_token to the control-plane revision table so gateways detect split-brain IAM state after failoverSchema 13 binaries are rejected after schema 14 commits

When upgrading across builds that corrected region lookup precedence (MINIO_REGION > MINIO_REGION_NAME > MINIO_SITE_REGION > persisted site region), also verify that no gateway environment file carries an unintended legacy MINIO_REGION_NAME override. See Configuration: Region selection.

Rollback rules

Once a schema migration transaction commits in PostgreSQL, older gateway binaries refuse to start against that database. If a migration fails or you must roll back to an earlier schema version:

  • First check silo.meta in PostgreSQL to see whether the migration transaction actually committed (a lost network connection does not prove rollback).
  • Never decrement schema_version, alter migration:* hashes, or drop columns manually to force an older binary to start.
  • To revert to an older schema version, perform a full physical restore from your pre-upgrade backup and WAL archive.

5 - Monitoring

Health endpoints and the PostgreSQL metrics endpoint.

Monitor pgsilo gateways, PostgreSQL, and your backup repository as distinct layers. Health check endpoints control load-balancer routing, /minio/metrics/v3/pg exposes gateway-to-PostgreSQL Prometheus metrics, and PostgreSQL system views track physical storage and transaction age.

Health check endpoints

Note

The /minio/health/* and /minio/metrics/* HTTP paths are retained for compatibility with standard S3 load-balancer and Prometheus configurations.

EndpointWhat it checksLoad-balancer use
/minio/health/liveGateway process liveness and local request queueProcess liveness check
/minio/health/readyGateway startup initialization and local request queueGeneral readiness (does not verify PostgreSQL writability)
/minio/health/cluster/readPostgreSQL database readabilityRead-only gateway pool routing
/minio/health/clusterPostgreSQL database writability (pg_is_in_recovery() = false and SILO_PG_READ_ONLY=off)Read-write gateway pool routing
curl --fail --silent --show-error \
  --cacert /path/to/s3-ca.crt \
  https://s3.example.net:9000/minio/health/cluster/read
curl --fail --silent --show-error \
  --cacert /path/to/s3-ca.crt \
  https://s3.example.net:9000/minio/health/cluster

A healthy writable gateway returns HTTP 200 on both endpoints. A healthy read-only standby gateway (SILO_PG_READ_ONLY=on) returns 200 on /minio/health/cluster/read and 503 on /minio/health/cluster. Note that /minio/health/live can still return 200 when PostgreSQL is unreachable.

Prometheus metrics (/minio/metrics/v3/pg)

The PostgreSQL backend exposes Prometheus metrics at /minio/metrics/v3/pg with metric names prefixed by minio_pg_. Generate a Prometheus scrape configuration with mcli using your administrative alias (pg-admin):

umask 077
mkdir -p "$HOME/.config/pgsilo-monitoring"
mcli admin prometheus generate pg-admin --api-version v3 \
  > "$HOME/.config/pgsilo-monitoring/prometheus-generated.yml"

Set metrics_path in the generated job to /minio/metrics/v3/pg and configure your Prometheus server to trust the gateway’s TLS CA. Keep the generated file out of version control because it contains bearer tokens.

AreaMetric namesInterpretation
Pool utilizationminio_pg_pool_acquired_connections, minio_pg_pool_max_connectionsLabeled by pool (data, control, coord); track saturation per gateway
Admission & pool waitsminio_pg_data_permits_waiters, minio_pg_pool_canceled_acquires_totalRising waiters indicate concurrent S3 requests hitting the gateway slot ceiling
Statistics freshnessminio_pg_statistics_success, minio_pg_statistics_age_secondsVerify statistics_success == 1 before trusting gauge values
Database role stateminio_pg_in_recovery, minio_pg_writableReports whether the target PostgreSQL instance is in recovery or writable
Annotation reaperminio_pg_annotation_garbage_payloads, minio_pg_annotation_garbage_bytesUnlinked annotation payloads queued for background batch deletion
Lifecycle maintenanceminio_pg_lifecycle_leader, minio_pg_lifecycle_errors_totalExactly one writable primary gateway should report lifecycle_leader == 1
Physical DB & WAL sizeminio_pg_database_bytes, minio_pg_cluster_wal_bytes_totalTotal PostgreSQL database bytes and cluster-wide WAL bytes
Standby replay backlogminio_pg_replay_pending_bytesUnreplayed WAL bytes on a physical standby (omitted when unavailable)
Capacity declarationminio_pg_capacity_knownAlways 0 in PostgreSQL mode because PostgreSQL does not report an exclusive S3 disk volume size

Logical quota vs. physical PostgreSQL storage

  • Billable logical bytes (billableBytes): counts plaintext object bodies (size / objectsTotalSize) plus attached annotation bytes (annotationBytes) across all committed versions (excluding delete markers). Incomplete multipart uploads do not count toward logical quota until CompleteMultipartUpload, even though their uploaded parts already occupy physical table space.
  • Console Unknown capacity: because minio_pg_capacity_known is 0, the web Console displays Unknown for total/free drive capacity. Unknown does not mean 0 B free.
  • Physical database size: minio_pg_database_bytes (and pg_database_size()) includes co-located application tables, B-tree indexes, TOAST tables, and dead MVCC tuples awaiting VACUUM. Deleting objects or unlinking annotations releases logical quota immediately, while physical disk pages become reusable only after background cleanup and PostgreSQL VACUUM.

PostgreSQL inspection queries

Run these read-only queries with a PostgreSQL monitoring role to inspect connection states, long-running transactions (which hold back VACUUM), and total database size:

SELECT pg_is_in_recovery() AS in_recovery;
SHOW transaction_read_only;

SELECT application_name, state, count(*)
FROM pg_stat_activity
WHERE datname = current_database()
GROUP BY application_name, state
ORDER BY application_name, state;

SELECT pid, application_name, state,
       clock_timestamp() - xact_start AS transaction_age
FROM pg_stat_activity
WHERE datname = current_database() AND xact_start IS NOT NULL
ORDER BY xact_start;

SELECT pg_size_pretty(pg_database_size(current_database())) AS database_size;

6 - Troubleshooting

Common failures, HTTP 429 and 503, and how to resolve them.

When diagnosing failed S3 or SQL requests, record the timestamp, gateway host, binary commit, HTTP status and S3 error code (or SQLSTATE), request ID, bucket, key, and versionId. Strip Authorization headers, presigned URL query strings, passwords, DSNs, and KMS/SSE-C keys before sharing logs.

First checks

Inspect the gateway service status and recent journal logs on Linux:

sudo systemctl status silo --no-pager
sudo journalctl -u silo --since '15 minutes ago' --no-pager

Then check the database-aware health endpoints (/minio/health/cluster/read and /minio/health/cluster) and verify PostgreSQL recovery and read-only state directly using a protected libpq service entry (~/.pg_service.conf with sslmode=verify-full):

PGSERVICE=silo-ops psql -X -v ON_ERROR_STOP=1 \
  -c 'SELECT current_database(), session_user, pg_is_in_recovery();' \
  -c 'SHOW transaction_read_only;'

Symptoms, root causes, and actions

SymptomCheck firstResolution
TLS certificate or hostname verification failureSILO_PG_DSN hostname, certificate SANs, /etc/silo/postgres-ca.crt, and file ownership (root:silo)Fix certificate SANs or file permissions; keep sslmode=verify-full enabled
Gateway refuses to start due to storage setting mismatchPersisted SILO_PG_SEGMENT_SIZE and SILO_PG_MAX_OBJECT_SIZE in silo.metaMatch the gateway’s environment variables to the initialized store settings; never edit silo.meta manually
Read-only standby gateway refuses to startschema_version on the standby and replication replay lagMigrate the primary from a writable gateway first and wait for the standby to replay the migration WAL
HTTP 503 SlowDown (or HTTP 429 TooManyRequests on builds before 1d387725c) under concurrencyConcurrent request limit (min(SILO_PG_MAX_CONNS, memlimit / (2 * segment_size))) and SILO_PG_QUEUE_TIMEOUTIncrease SILO_PG_MAX_CONNS (e.g., to 72 for 64 concurrent clients), ensure gateway RAM and PostgreSQL max_connections are sufficient, and use 1d387725c or later so bursts queue up to SILO_PG_QUEUE_TIMEOUT (5s)
/minio/health/live is 200, but /minio/health/cluster returns 503PostgreSQL connectivity, pg_is_in_recovery(), connection pool exhaustion, or SILO_PG_READ_ONLY=onInspect PostgreSQL logs, pg_stat_activity, and minio_pg_* metrics
S3 AccessDeniedIAM policy Allow/Deny, service-account/STS session policy, SILO_PG_READ_ONLY=on, and iam_and_pg role bindingsVerify IAM permissions on the target key/version and check silo.native_auth_principals and silo_bucket grants if iam_and_pg is enabled
SQL SQLSTATE 42501session_user (whether SET ROLE was used), USAGE on silo_api/silo_bucket, function EXECUTE, and bucket ACL table grantsConnect directly as the application SQL login (app_sql) and grant the required function and bucket ACL privileges
SQL SQLSTATE 0A000Transaction isolation level (Repeatable Read / Serializable), SSE-encrypted object, or unsynchronized bucket policyRun SQL writes under Read Committed; use the S3 API to read/write encrypted objects
CompleteMultipartUpload failsTotal assembled size vs. SILO_PG_MAX_OBJECT_SIZE, part sizes (>= 5 MiB except last part), part order, and ETagsEnsure the combined object does not exceed SILO_PG_MAX_OBJECT_SIZE (default 256 MiB, max 1 GiB)
IAM requests fail across gateways after failoverOld-primary fencing, revision_token reload, standby replication heartbeats, and host clock skew (<= 500 ms)Ensure a writable gateway is connected to the promoted primary, writing heartbeats, and NTP keeps primary/standby clocks within 500 ms
Database disk size stays high after DELETERetained historical versions, incomplete multipart uploads, minio_pg_annotation_garbage_bytes, long SQL transactions, and VACUUMDelete old versions or abort incomplete uploads, verify minio_pg_lifecycle_leader == 1, and check pg_stat_activity for long-running snapshots blocking VACUUM

HTTP 503 SlowDown vs. HTTP 429 TooManyRequests

Each gateway limits active S3 requests to min(SILO_PG_MAX_CONNS, memlimit / (2 * SILO_PG_SEGMENT_SIZE), api requests_max). With the default SILO_PG_MAX_CONNS=32, bursts above 32 concurrent requests hit admission control:

  • Starting with 1d387725c on feat/pg-backend (2026-11-08), excess requests wait in an admission queue for up to SILO_PG_QUEUE_TIMEOUT (5s by default) without holding a database connection. If the wait expires, the gateway returns HTTP 503 SlowDown, which boto3 and AWS SDK for Go v2 automatically retry with backoff.
  • In earlier builds, including 299378b and the frozen October 8, 2026 local checkpoint (3c7fdc03), admission queueing does not exist: excess requests immediately receive HTTP 429 TooManyRequests, which standard S3 SDKs do not retry by default.

See Configuration: Concurrent request limit for capacity sizing steps.

Uncertain writes after network timeouts

A network drop or request timeout can occur after PostgreSQL commits the transaction but before the client receives the HTTP or SQL response. Blindly retrying an unconditional PutObject in a versioned bucket creates a duplicate version.

  • Before retrying a timed-out write, check whether the expected key, versionId, ETag, or business operation ID already exists.
  • When writing application rows and objects together in one SQL transaction via silo_api, record an application idempotency key in your business table inside the same transaction so you can query its commit status deterministically.

7 - Deploy with Pigsty

The Pigsty role for Silo with a PostgreSQL backend, and its status.
Important

The minio_backend: postgres branch in the Pigsty minio Ansible role is pinned to an unpublished coordination commit (5633285b2b8d40321e458026abe2656944674ed3) and depends on the unpublished silo DEB/RPM packages (MVP in progress). Released versions of Pigsty do not yet include this backend branch.

The coordinated Pigsty minio role adds a minio_backend: postgres execution path to minio.yml. It deploys silo systemd services connected to an existing PostgreSQL database without inheriting erasure-coded disk arguments or local volume mounts.

Scope and prerequisites

  • The role deploys stateless silo gateways only; it does not create the PostgreSQL cluster, database owner (silo_owner), or silo database, and it does not configure database backups. Complete the database setup in Install first.
  • minio_pg_dsn must be a single-host postgresql:// URI with an explicit username, database name, sslmode=verify-full, and sslrootcert matching minio_pg_ca_file (located under /etc/silo/). The role rejects multi-host fallback URIs and query parameters that override connection identity.
  • Certificates used by the gateway must include 127.0.0.1 in their IP SANs because the role’s post-start health check probes https://127.0.0.1:9000/minio/health/cluster (for writable gateways) or /minio/health/cluster/read (for read-only gateways) with strict TLS verification.

Example two-gateway inventory

Store credentials (vault_silo_root_user, vault_silo_root_password, and URL-encoded vault_silo_pg_dsn) in an encrypted Ansible Vault file (vault.yml), and define the two-gateway silo_pg group in inventory.yml:

all:
  children:
    silo_pg:
      hosts:
        10.10.10.11: { minio_seq: 1 }
        10.10.10.12: { minio_seq: 2 }
      vars:
        minio_cluster: silo-pg
        minio_type: silo
        minio_backend: postgres
        minio_https: true
        minio_domain: s3.example.net
        minio_access_key: "{{ vault_silo_root_user }}"
        minio_secret_key: "{{ vault_silo_root_password }}"
        minio_pg_dsn: "{{ vault_silo_pg_dsn }}"
        minio_pg_ca_src: /srv/pgsilo-pki/postgres-ca.crt
        minio_pg_ca_file: /etc/silo/postgres-ca.crt
        minio_pg_max_conns: 32
        minio_pg_control_conns: 4
        minio_pg_coord_conns: 2
        minio_pg_acquire_timeout: 5s
        minio_pg_request_timeout: 15m
        minio_pg_segment_size: 8MiB
        minio_pg_max_object_size: 256MiB
        minio_pg_package_src: /srv/artifacts/silo_<version>_<arch>.deb
        minio_pg_package_sha256: REPLACE_WITH_PACKAGE_SHA256
        minio_pg_binary_sha256: REPLACE_WITH_BINARY_SHA256
        minio_extra_vars: |
          MINIO_REGION=us-east-1
        minio_buckets: []
        minio_users: []

Setting minio_buckets: [] and minio_users: [] skips Pigsty’s default pgbackrest backup bucket/user creation so database backups are never stored inside the pgsilo service that depends on that same database.

Deploy the first writable gateway alone (-l 10.10.10.11 -e minio_provision=false) so it initializes the PostgreSQL schema without racing a second node, then run the playbook across the group:

ansible-playbook -i inventory.yml -l 10.10.10.11 --ask-vault-pass \
  -e minio_provision=false -e @vault.yml minio.yml

ansible-playbook -i inventory.yml -l silo_pg --ask-vault-pass \
  -e @vault.yml minio.yml

What the role configures

ComponentBehavior in minio_backend: postgres
Package & binary verificationCopies the local .deb/.rpm from minio_pg_package_src, verifies minio_pg_package_sha256, installs it, and verifies /usr/bin/silo against minio_pg_binary_sha256
OS accountRuns the service as minio:minio (minio_user defaults to minio, whereas manual DEB installation uses silo:silo)
Service & environmentWrites /etc/systemd/system/silo.service and /etc/default/silo (root:minio, mode 0640) with no_log secret protection
TLS certificatesPlaces public.crt and private.key in /home/<minio_user>/.minio/certs/ and the PostgreSQL CA at /etc/silo/postgres-ca.crt
Read-only gatewaysSetting minio_pg_read_only: true on a standby gateway host configures SILO_PG_READ_ONLY=on, skips bucket/user provisioning, and probes /minio/health/cluster/read
MonitoringDefaults MINIO_PROMETHEUS_AUTH_TYPE=public in the environment template and provides the files/grafana/minio/silo-pg.json dashboard; restrict metrics network access or override to jwt authentication

Note that re-running minio.yml across nodes does not replace the stop-all-writers procedure required for a schema migration; follow Upgrade whenever schema_version changes.