Upgrade
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
- Record current versions and take a physical backup: record the running
silobinary checksums andschema_version, take a verified physical backup (Backup and restore), and confirm external SSE-S3 KMS keys are backed up. - Stop all gateways and SQL writers: drain client traffic, stop every writable and read-only
silogateway, disable automatic systemd/supervisor restarts, and pause directsilo_apiSQL writer jobs. Verify inpg_stat_activitythat all gateway sessions have exited. - Install the new binary on all gateway hosts and verify SHA-256 checksums.
- 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. - Verify schema 14 and health endpoints: confirm the first gateway passes
/minio/health/cluster/readand/minio/health/cluster, and verify the migration ledger insilo.meta. - 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.
- 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:
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 version | Key changes | Compatibility boundary |
|---|---|---|
| Schema 12 | Added checksum metadata compatibility verification (CRC64NVME, SHA512, XXHASH*) | Schema 11 binaries cannot interpret new checksum type bits and are rejected after schema 12 commits |
| Schema 13 | Added object annotations, transactional quota counters, copy_object annotation support, and deferred annotation payload cleanup | Schema 12 binaries are rejected after schema 13 commits |
| Schema 14 | Added persistent random UUID revision_token to the control-plane revision table so gateways detect split-brain IAM state after failover | Schema 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.metain PostgreSQL to see whether the migration transaction actually committed (a lost network connection does not prove rollback). - Never decrement
schema_version, altermigration:*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.
