Features
“PostgreSQL In Great STYle”: Postgres, Infras, Graphics, Service, Toolbox, it’s all Yours.
—— Battery-included, local-first PostgreSQL distribution, open-source RDS alternative
Value Propositions
- Extensibility: Powerful extensions out of the box: deep integration of PostGIS, TimescaleDB, Citus, PGVector, 600 plugins, and 12 PG kernels.
- Reliability: Quickly create high-availability, self-healing PostgreSQL clusters with built-in point-in-time recovery, access control, a self-signed CA, and TLS.
- Observability: Prometheus and Grafana provide a modular monitoring stack that can operate independently. See the Gallery and Demo.
- Availability: Deliver stable, reliable, auto-routed, transaction-pooled, read-write separated high-performance database services, with flexible access modes via HAProxy, Pgbouncer, and VIP.
- Maintainability: Easy to use, Infrastructure as Code, Management SOPs, auto-tuning, local software repository, Vagrant sandbox and OpenTofu templates, zero-downtime migration solutions.
- Composability: Modular architecture design, reusable Infra, various optional modules: Redis, Silo object storage, ETCD, DuckDB, Docker, Supabase.

Overview
Pigsty is a local, open-source alternative to PostgreSQL RDS:
- Battery-Included RDS: From kernel to RDS distribution, providing production-grade PG database services for versions 14-18 on EL/Debian/Ubuntu.
- Rich Extensions: 600 extensions provide distributed, time-series, geospatial, graph, vector, and multi-model capabilities.
- Flexible Modular Architecture: Compose Redis, Etcd, and Silo object-storage modules with PostgreSQL modes such as Mongo; monitor existing RDS, hosts, and databases independently.
- Stunning Observability: Monitor databases with the Prometheus/Grafana observability stack.
- Battle-Tested Reliability: Self-healing high-availability architecture: automatic failover on hardware failure, seamless traffic switching. With auto-configured PITR as safety net for accidental data deletion!
- Easy to Use and Maintain: Declarative APIs, GitOps, Database/Infra-as-Code, and management SOPs simplify operations.
- Solid Security Practices: HBA, ACL, TLS, backup, logging, and host-firewall foundations, with explicit default boundaries and production hardening requirements.
- Broad Application Scenarios: Low-code data application development, or use preset Docker Compose templates to spin up massive software using PostgreSQL with one click!
- Open-Source Free Software: Own better database services at less than 1/10 the cost of cloud databases! Truly “own” your data and achieve autonomy!
PostgreSQL integrates ecosystem tools and best practices:
- Out-of-the-box PostgreSQL distribution, deeply integrating 600 packaged extensions for geospatial, time-series, distributed, graph, vector, search, and AI!
- Runs on bare operating systems without container support, supporting mainstream operating systems: EL 8/9/10, Ubuntu 22.04/24.04/26.04, and Debian 12/13.
- Based on patroni, haproxy, and etcd, creating a self-healing high-availability architecture: automatic failover on hardware failure, seamless traffic switching.
- Combines pgBackRest with optional Silo object storage to provide out-of-the-box point-in-time recovery (PITR), protecting against software defects and accidental data deletion.
- Based on Ansible providing declarative APIs to abstract complexity, greatly simplifying daily operations management in a Database-as-Code manner.
- Pigsty has broad applications, can be used as complete application runtime, develop demo data/visualization applications, and massive software using PG can be spun up with Docker templates.
- Provides Vagrant-based local development and testing sandbox environment, and Terraform-based cloud auto-deployment solutions, keeping development, testing, and production environments consistent.
- Run PostgreSQL in Mongo-compatible mode with DocumentDB and the FerretDB Docker APP
Battery-Included RDS
Run production PostgreSQL services on your own infrastructure.
PostgreSQL provides the database kernel. A database service also needs operational tools, which Pigsty integrates. These include extension installation, connection pooling, load balancing, service access, high availability, failover, logs, metrics, and alerts. Pigsty also provides backups, recovery, PITR, access control, tuning, encryption, certificates, NTP, and DNS. Configuration management, CMDB, and management playbooks complete the service infrastructure.
Pigsty supports PostgreSQL 14 ~ 18 and compatible forks on EL, Debian, Ubuntu, and compatible distributions. It supports x86_64 and ARM64 without requiring containers. Alongside kernels and extensions, it supplies database infrastructure and runtime services. It includes automatic deployment for local sandboxes, production environments, and cloud IaaS.
Pigsty can initialize an environment from bare metal with one command. Developers and operations engineers can use it to manage production databases without dedicated database experts.
Rich Extensions
Combine multiple data models and database workloads in PostgreSQL.
Pigsty integrates 600 extensions from the PostgreSQL extension ecosystem. These provide ready-to-use support for multiple data models.
Extensions can work together to provide combined capabilities. Use PostGIS for geospatial data and TimescaleDB for time-series and event analysis. Add Citus for a distributed geospatial and temporal database. Use PGVector for embeddings and ParadeDB for ElasticSearch-level full-text search. Combine SQL, full-text, and approximate vector search for hybrid queries. pg_duckdb, pg_mooncake, and other extensions provide dedicated OLAP and data lakehouse analytical performance.
Using PostgreSQL in place of separate MySQL, Kafka, ElasticSearch, MongoDB, and big data analysis systems can simplify architecture. This approach improves development efficiency and agility. It can reduce software, hardware, development, and operations costs.
Flexible Modular Architecture
Flexible composition, free extension, multi-database support, monitor existing RDS/hosts/databases
Pigsty components are independently deployable modules. Combine them for your requirements. INFRA provides monitoring; NODE configures and manages nodes. PGSQL on multiple nodes forms a primary-replica HA cluster. ETCD provides its consensus and metadata storage.
Optional modules extend the four core modules. MINIO deploys Silo for local object storage and centralized database backups. REDIS provides standalone primary-replica, sentinel, and native cluster modes. DOCKER runs stateless applications.
Pigsty supports compatible PostgreSQL kernels and derivatives. Babelfish provides MS SQL Server compatibility; IvorySQL provides Oracle compatibility. OpenHaloDB provides MySQL compatibility. OrioleDB targets high OLTP performance.
Furthermore, you can use PostgreSQL Mongo mode for MongoDB compatibility, Supabase for Firebase compatibility, and PolarDB to meet domestic compliance requirements.
Message queues are covered by the KAFKA module, which deploys Kafka 4.x dynamic KRaft clusters.
More professional/pilot modules will be continuously introduced to Pigsty, such as GPSQL, DUCKDB, TIGERBEETLE, KUBERNETES, CONSUL, GREENPLUM, CLOUDBERRY, MYSQL, …
Stunning Observability
Monitor PostgreSQL with an integrated open-source observability stack.
Pigsty monitoring uses Grafana for visualization, VictoriaMetrics for metrics, and VictoriaLogs for log collection and queries. Alertmanager sends alerts, and Blackbox Exporter checks service availability. The INFRA module deploys this Grafana / Prometheus-compatible stack with one command.
Pigsty automatically monitors every managed component: host nodes, HAProxy load balancers, PostgreSQL databases, PgBouncer connection pools, Etcd metadata stores, Redis-compatible caches, Silo object storage, and the monitoring infrastructure itself. Grafana dashboards and preset alert rules provide immediate operational visibility. The same stack can also monitor applications, existing database instances, and cloud RDS services.
Monitoring supports failure analysis, slow query optimization, capacity assessment, and resource planning. More than three thousand metric types describe the system. Pigsty processes, aggregates, and presents them in dashboards. Views range from global summaries to CRUD details for tables, indexes, and functions. Navigate between levels and objects to examine current state and history and estimate future trends.
The monitoring module can be used independently for existing hosts, database instances, and cloud RDS. One connection string and one command configure PostgreSQL monitoring.
Visit the Screenshot Gallery and Online Demo for more details.
Battle-Tested Reliability
High availability and point-in-time recovery are included.
For table/database drops caused by software defects or human error, Pigsty provides out-of-the-box PITR point-in-time recovery capability, enabled by default without additional configuration. As long as storage space allows, base backups and WAL archiving based on pgBackRest let you quickly return to any point within the recovery window. You can use local directories/disks, Silo deployed by the MINIO module, or external S3-compatible object-storage services to retain longer recovery windows, according to your budget.
Pigsty provides a high-availability self-healing architecture based on Patroni, etcd, and HAProxy. When the node, network, quorum, and synchronous-replica assumptions hold, it can fail over the primary automatically. Actual RTO and RPO depend on replication mode, failure type, timeout settings, and client reconnection behavior.
HAProxy switches traffic automatically and supports client access through DNS, VIP, LVS, and other methods. Failover and switchover cause brief interruptions without requiring new connection strings or application restarts. Small maintenance windows support rolling cluster maintenance and upgrades without application coordination. Hardware repair can wait while redundant nodes provide service. Production users include large organizations and core institutions.
The largest deployment has 25K CPU cores and 200+ large PostgreSQL instances. It maintained availability above 99.999% over six to seven years despite dozens of hardware failures, other incidents, and several DBA changes.
Easy to Use and Maintain
Infra as Code, Database as Code, declarative APIs encapsulate database management complexity.
Pigsty uses declarative inventories to describe the required database cluster. Its playbooks implement that state. This resembles Kubernetes CRDs and Operators, but applies to databases and infrastructure on containers, virtual machines, or physical machines.
To create or remove clusters, replicas, databases, users, services, extensions, or whitelist rules, edit the inventory and run the idempotent playbooks. Pigsty adjusts the system to the declared state. It tunes settings for the hardware. Users specify cluster names, instances, hosts, and a transaction, analytics, critical, or tiny template. Developers can manage these tasks themselves. Detailed parameters also support custom DBA requirements.
Pigsty can install with one command and prepackaged dependencies, without internet access. Vagrant or Terraform templates can provision the required machines. A complete local laptop or cloud VM deployment takes about ten minutes. A 1-core 2GB sandbox VM simulates production features for development, testing, demonstrations, and learning.
Solid Security Practices
Pigsty provides the security foundations required for database deployment. Access controls include layered HBA, built-in roles and default privileges, and SCRAM-SHA-256. Other mechanisms include page checksums, a local CA, component certificates, backup, PITR, centralized logs, and firewall configuration.
The defaults target development, testing, and demonstrations on a trusted intranet. Production deployments must replace public credentials, review network boundaries, enforce TLS where required, configure server-certificate verification, and establish backup recovery, privilege review, and incident-response processes.
Security and Compliance documents each mechanism’s default state and boundary. Security Considerations provides production hardening guidance, and Compliance maps relevant controls to MLPS and SOC 2. Whether a deployment meets a specific requirement depends on scope, organizational process, continuous evidence, and the auditor’s conclusion.
Broad Application Scenarios
Deploy PostgreSQL applications with preset Docker templates.
The database is often the most complex part of a data application. For example, a core difference between GitLab Enterprise and Community Edition is PostgreSQL monitoring and high availability. A local PostgreSQL RDS can replace paid application-specific database management components.
Pigsty supplies the Docker module and ready-to-use Compose templates. Use managed HA PostgreSQL, Redis, and Silo as backend storage for stateless applications. Examples include GitLab, Gitea, Wiki.js, NocoDB, Odoo, Jira, Confluence, Harbor, Mastodon, Discourse, KeyCloak, and Mattermost. Pigsty can simplify deployment when applications require reliable PostgreSQL.
Pigsty includes PGAdmin4, PGWeb, ByteBase, PostgREST, and Kong development tools. It also supports PostgreSQL-backed systems such as EdgeDB, FerretDB, and Supabase. Use built-in Grafana and PostgreSQL to create interactive data applications with little code. ECharts panels provide additional interactive visualizations.
Pigsty provides a runtime for AI applications. Agents can use PostgreSQL and observability services to build data-driven applications.
Open-Source Free Software
PostgreSQL community members develop Pigsty as free software under Apache-2.0.
Pigsty is open-source and free. It provides enterprise PostgreSQL services near hardware cost without requiring database experts. Vendor enterprise services and public cloud RDS charge premiums of several to over ten times hardware cost.
Many users choose cloud databases because they cannot manage databases themselves or lack alternatives. Pigsty aims to provide a cloud-neutral, better open-source RDS alternative. It follows upstream PostgreSQL without vendor lock-in, license fees, node limits, or data collection. Users retain control of their data.
Pigsty automates manual database operations, but rare cases still need expert help. Subscription services provide this support for enterprise users. Consulting fees of tens of thousands are less than one-thirtieth of a top DBA’s annual salary. For community users, we contribute support through free assistance and daily Q&A.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)








