PostgreSQL
A relational database that keeps your data correct under pressure.
Difficulty: intermediateTime: 15+ hours22 of 75 sections written
PostgreSQL is a relational database server: it stores data in typed tables, enforces the rules you declare on every write, and answers questions about that data through SQL. It is not merely a place SQL happens to run — every constraint you declare is checked on every write, which is what keeps the data trustworthy as more of it accumulates.
Sections
75 sections- PostgreSQL Fundamentalsbeginner24 min
- SQL Fundamentalsbeginner30 min
- Joinsintermediate32 min
- Subqueries and CTEsintermediate34 min
- Window Functionsintermediate30 min
- PostgreSQL Data Typesintermediate36 min
- NULL, Three-Valued Logic and Data Semanticsintermediate34 min
- Constraints and Data Integrityintermediate32 min
- Schema Design and Data Modelingintermediate38 min
- Primary Keys, Foreign Keys and Relationship Designintermediate34 min
- Viewsintermediate28 min
- Sequences and Identity Columnsintermediate26 min
- PostgreSQL Functions and Proceduresintermediate30 min
- Triggersintermediate30 min
- Transactions — Core Competencyintermediate34 min
- Isolation Levels and Concurrencyintermediate36 min
- MVCC — Must Understandintermediate32 min
- VACUUM, ANALYZE and Autovacuumintermediate34 min
- Storage and Table Internalsadvanced32 min
- Index Fundamentalsintermediate36 min
- B-Tree Indexesintermediate34 min
- Other Index Typesadvanced32 min
- Partial, Expression and Covering Indexes4 items
- Query Planning and EXPLAIN7 items
- PostgreSQL Query Planner6 items
- Query Optimization8 items
- Sorting, Aggregation and Hashing5 items
- Statistics5 items
- Common SQL Performance Problems13 items
- Pagination5 items
- JSON and JSONB6 items
- Arrays4 items
- Full-Text Search5 items
- Transactions in Real Applications5 items
- Locks6 items
- Advisory Locks4 items
- Upserts and Conflict Handling5 items
- Safe Counters and Atomic Updates4 items
- Date and Time6 items
- Numeric and Financial Data5 items
- PostgreSQL Security6 items
- Authentication and Connection Security6 items
- Row-Level Security5 items
- Schema and Search Path Security4 items
- Extensions3 items
- Connection Management5 items
- PostgreSQL Connection Pooling4 items
- Monitoring and Observability6 items
- Logging4 items
- Checkpoints and WAL5 items
- Crash Recovery4 items
- Backup and Restore6 items
- Point-in-Time Recovery5 items
- Replication6 items
- Logical Replication4 items
- High Availability6 items
- Partitioning5 items
- Sharding and Horizontal Scaling4 items
- Tablespaces and Storage Layout4 items
- Extensions and Specialized Workloads2 items
- Bulk Loading and COPY4 items
- Batch Updates and Deletes5 items
- Full-Text and Search Architecture3 items
- PostgreSQL with Python/Django7 items
- PostgreSQL with Async Backends4 items
- PostgreSQL Testing5 items
- Data Migrations5 items
- Operational Troubleshooting2 items
- Performance and Capacity Planning4 items
- PostgreSQL Anti-Patterns15 items
- Production Checklist14 items
- What a 5-Year PostgreSQL Engineer Should Be Able to Explain22 items
- Recommended Priority for a 5-Year PostgreSQL Engineer3 items
- Practical Projects to Validate PostgreSQL Skills5 items
- Recommended Learning Order1 item
Why it matters
- It is the default system of record for data that must stay correct — orders, accounts, inventory — because it enforces constraints rather than trusting the application to.
- MVCC lets readers and writers work concurrently without blocking each other for most workloads, which most other relational databases approximate less cleanly.
- A single server can be the backbone for transactional data, JSON documents (JSONB), full-text search and analytics queries — before reaching for a specialized system.
- Django and FastAPI both commonly sit on top of PostgreSQL, so the concepts here carry straight into two of the other topics here.
Where it is used
- Systems of record — orders, accounts, inventory, anywhere correctness cannot be optional
- Backends built on Django or FastAPI, both of which default to it
- Multi-tenant SaaS, using schemas or row-level security for isolation
- Analytics and reporting, via window functions, CTEs and materialized views
The big picture
- SQL — queries, joins, CTEs
- leads to Storage (writes become row versions)
- Storage — MVCC, WAL, vacuum
- leads to Concurrency (MVCC makes possible)
- Concurrency — locks, isolation, transactions
- leads to Performance (the planner reasons about)
- Performance — indexes, the planner
- leads to Operations (is kept healthy by)
- Operations — backup, replication, monitoring