Reliable Infra: Rock-Solid and Secure
Towering peaks, bedrock solid, standing firm at any summit!
High-Availability: Reliable PostgreSQL RDS
Pigsty delivers PG HA solutions which follows the industry best practice
Adjustable RTO and RPO, balancing trade-offs for specific scenarios.
- Primary failover metrics: RTO ≈ 30 seconds (adjustable)
- async commit mode: RPO < 1MB, crit mode: RPO = 0 (adjustable)
- Replica failure / switchover: RTO ≈ 0 seconds
Self-Healing: Adaptive service failover
Self-healing arch with transparent topology, multi-writer experience
Flexible service access, automatically traffic routing, DevOps sleep well
pg-pitr # Recover to WAL archive endpoint
pg-pitr -i # Recover to most recent backup point
pg-pitr --time=2022-12-30 14:44:44+08 # Recover to specific time point
pg-pitr --name=my-restore-point # Recover to named restore point
pg-pitr --lsn=0/7C82CB8 -X # Recover immediately before LSN
pg-pitr --xid=1234567 -X -P # Recover before specified XID
pg-pitr --backup=latest # Recover to latest backup set
pg-pitr --backup=20221108-105325 # Recover to specific backup set
PITR Protection: Pre-configured Backup & Archives
Pre-configures physical backups and enables WAL archiving by default
Local fs or remote S3/MinIO, mature disaster recovery solutions on demand
- Industry backup best practices: pgBackRest + MinIO / Local Disk / S3
- Protection against software defects and human errors (Accidental deletion)
- One-command backup and restore, flexible backup strategies with crontab
- In-place concurrent incremental PITR, fast recovery with quick retry options
Infra Closure: No external dependencies
A complete infra closure for PostgreSQL RDS, requiring no external deps.
Local repo snapshoting all packages - run locally until the end of time.
- Observability infrastructure: Prometheus / Grafana
- Load balancing and reverse proxy: Nginx / HAProxy
- Configuration and object storage: Etcd / MinIO
- Critical services DNS and NTP: DNSMasq / Chronyd
Role Name | Description |
---|---|
dbrole_readonly | Role: Global read-only access |
dbrole_readwrite | Role: Global read-write access |
dbrole_admin | Role: Admin/object creation |
dbrole_offline | Role: Limited read-only access |
postgres | System superuser |
replicator | System replication user |
dbuser_dba | PostgreSQL admin user |
dbuser_monitor | PostgreSQL monitoring user |
Access Control: Built-in best-practice model
Default ACL with read/write/admin/analytics/monitoring/DBA separation
Secure enough and ready for using without any further configuration
- Default roles: readonly / readwrite / admin / offline
- Default users: DBSU / DBA / replication / monitoring
- Default HBA rule sets with simple configuration options
- Managed pgbouncer db/user credentials, sync with postgres
Confidentiality: Guaranteed data security
Self-signed CA, SSL encryption, password for backups and endpoints
As long as your passwords & key are secure, your data remains safe.
- Local CA-issued certificates with SSL/TLS enabled globally by default
- SCRAM-SHA-256 verification, AES-encrypted backup data
- Precise allow/deny list default policies to prevent unauthorized access
- All externally exposed web services are uniformly managed through Nginx
Data Integrity: Thorough verification
Data checksums for silent corruption. Replicas and delayed standby instances.
Audit extensions and centralized logging, with transparency and efficiency.
- CRIT configuration template: optimized for data integrity
- Data checksums enabled to prevent silent data corruption
- WatchDog: STONITH to prevent cluster split-brain
- Audit Log: centrally collected, tamper-proof

Production Case
PG Clusters
100+
CPU Cores
25,000
Deduplicated Data
200TB
Overall Availability
> 99.999%
Stable operation in production for 6 years, overall availability > 99.999%
Battle-Tested: Availability Results
Running robustly in many large organizations, maintain 99.999%+ availability.
Ultimate business continuity: rolling upgrades, switchovers, and online migrations
- No single points of failure: Redundant HA designs for all critical components
- Zero-downtime migration based on logical replication blue-green deployment
- Emergency plans: standard SOPs for various failure scenarios
- Benchmark case: 25,000 vCPU x six years x 99.999% availability
PIGSTY