Skip to content

Use Cases

Pigsty is built around PostgreSQL, but it's far more than a "database installer". The categories below help you decide quickly: is Pigsty right for me?

🏢 Scenario 1 — Self-hosted open-source RDS

Pain: managed RDS is expensive, versions lag, extensions are restricted, data residency is constrained.

With Pigsty:

  • Deploy a production HA cluster on ≥3 nodes in your own IDC / hybrid cloud / VPC
  • Automatic failover via Patroni + etcd; HAProxy handles read/write routing
  • pgBackRest provides PITR; pair with MinIO for off-site cold backup
  • Grafana dashboards and Prometheus alerts out of the box

Further reading: Deployment guideArchitecture planningThree-node HA template


🤖 Scenario 2 — AI / vector retrieval backend

Pain: LLM apps need vector search, semantic cache and memory storage — adding Milvus / Chroma increases operational burden.

With Pigsty:

  • Ships with pgvector, pgvectorscale, pg_search, pg_trgm etc. — one engine handles vector + full-text + JSON search
  • The VIBE module offers a Code-Server / JupyterLab / Claude Code sandbox for AI development
  • FERRET gives PostgreSQL a MongoDB-compatible wire protocol for LangChain / LlamaIndex integration

Further reading: PGSQL extensionsVIBE module


🧪 Scenario 3 — Local development / data sandbox

Pain: developers want to reproduce a production-like PostgreSQL environment locally with the full monitoring stack and rich extensions.

With Pigsty:

  • One command brings up Pigsty on a 1C/2G Linux VM or WSL — PostgreSQL, Grafana, Prometheus included
  • Vagrant / Terraform templates provision multi-node sandboxes in minutes
  • 40+ configuration templates (meta, rich, fat, slim, infra, vibe) ready to reuse

Further reading: Single-node installSandboxConfig templates


📊 Scenario 4 — Multi-model data platform

Pain: the business needs OLTP, time-series, geo, document, KV and object storage simultaneously — you don't want to introduce a separate cluster for each.

With Pigsty: use PostgreSQL as the core; one infrastructure handles:

Data typeStack
OLTPPostgreSQL 17 + Patroni HA
OLAPCitus / DuckDB FDW / pg_mooncake
Time-seriesTimescaleDB
GeoPostGIS
Vectorpgvector / pgvectorscale
DocumentFerretDB (MongoDB protocol)
KV / cacheRedis cluster / sentinel / master–replica
Object storageMinIO single / multi-node
Distributed FSJuiceFS

Further reading: Module overviewRedisMinIO


🔒 Scenario 5 — Compliance / private / domestic stack

Pain: regulated customers (finance, government) require offline deployment, domestic OS, security grading and audit trails.

With Pigsty:

  • Supports RockyLinux, AlmaLinux, openEuler, UOS, Kylin and more (OS compatibility)
  • Complete offline installer — delivery without public internet (offline install)
  • TLS, password policy, row-level security and audit logging on by default (security hardening)
  • AGPL 3.0 license; commercial subscription available

Further reading: Offline installSecurity hardeningOS compatibility


🚀 Scenario 6 — SaaS / application templates

Pain: when shipping an application, you want "batteries-included" data layer instead of reinventing the wheel.

With Pigsty: 28+ application templates cover common data apps; one-command Docker Compose:

  • BI / dashboards: Supabase, Metabase, Superset
  • Low-code / business: Odoo, NocoDB, Directus
  • AI / LLM: Dify, Langfuse, Mastra
  • Dev tools: Gitea, Harbor, Keycloak

Further reading: Application templatesDocker module


When Pigsty is not a fit

To save you from stepping on mines, Pigsty is not:

  • A managed cloud database SaaS — it runs on your machines; there is no hosted service
  • A Kubernetes operator — Pigsty targets long-lived "pet" nodes, not ephemeral container scheduling
  • A thin PostgreSQL install script — its value is in the full infrastructure, not just the database

If you want "PostgreSQL on K8s", look at CloudNativePG and similar projects.

Released under the AGPL 3.0 License