#atom

Installation and management of PostgreSQL database on self-controlled infrastructure

Core Idea: Self-hosting PostgreSQL involves installing, configuring, and maintaining a PostgreSQL database server on owned or rented infrastructure, providing full control over performance, configuration, and costs compared to managed database services.

Key Elements


- **Cost Comparison**
    - Self-hosted on VPS: ~€10/month for 4 vCPU, 4GB RAM, 80GB storage
    - Cloud SQL equivalent: ~€50/month for 1 vCPU, 2GB RAM, 100GB storage
    - Performance often better on self-hosted with equivalent or lower cost
    - No per-operation or per-query charges
    - Predictable cost scaling

## Connections

- **Related Concepts**: PostgreSQL (database system), Database Migration (transition process), Database Backups (maintenance procedure)
- **Broader Context**: Cloud vs Self-hosting Tradeoffs (decision framework), Database Administration (skill domain)
- **Applications**: Cloud to VPS Migration (implementation scenario), High-Performance OLTP (use case)
- **Components**: pgvector (extension), PostgreSQL Replication (advanced feature)

## References

1. PostgreSQL installation documentation: https://www.postgresql.org/docs/current/installation.html
2. Example migration from Cloud SQL: https://github.com/galeone/fitsleepinsights

#postgresql #self-hosting #database #administration

---
**Connections:**
- 
---
**Sources:**
- From: Getting back to the EU from Google Cloud to Self-Hosted EU Infrastructure