Getting started with pgs3
1. Install pgs3
Install the pgs3 package on a Linux PostgreSQL 17–19 server (PG16 is best effort; see Downloads for platform availability):
Need to build from source or spin up a test container instead? See Build from source or Docker.
2. Enable the extension and start the endpoint
Connect to your database as an administrator, create an unprivileged tenant role with an S3 key pair, and start the HTTP worker pool:
Confirm that the HTTP workers are listening on 127.0.0.1:9000:
pgs3.start() starts a dynamic pool for the current database without editing postgresql.conf. For persistent endpoints that boot with PostgreSQL, see Automatic startup.
3. Upload, version, and recover with mc
Using the MinIO Client (mc, packaged as mcli on some Linux distributions), register the local endpoint with SigV4 and path-style addressing (--path on):
Add the alias and create a bucket:
Upload a file and read it back:
Overwrite the object and delete it—
pgs3keeps versioning permanently enabled, so an ordinary delete writes a delete marker instead of losing history:Recover the first revision by its version ID (
1):
4. Clean up
When you are done testing, stop the worker pool and remove the local alias:
Next steps
- Connect S3 clients — Full recipes for
mc,rclone, Python (boto3), DuckDB (httpfs), ands3fs. - SQL, versioning, and tenants — Commit objects in SQL transactions, restore versions, fork buckets, and isolate multiple tenants.
- Deploy and operate — Automatic startup, Nginx TLS proxy, backups, upgrades, and source/container builds.
- Performance and limits — Benchmark charts against MinIO and hard operational boundaries.