# #postgresql

How PostgreSQL works inside: storage, WAL, transactions, the planner, and the code paths behind them.

> Canonical URL: https://sudohulk.com/tags/postgresql
> Feed: https://sudohulk.com/tags/postgresql/rss.xml
> Author: Vignesh Kumar A <vignesh@sudohulk.com>
> Licence: CC BY 4.0. Quote freely, cite the canonical URL.

---

## Writing

- [How PostgreSQL tells every connection its cache is stale](https://sudohulk.com/writing/postgres-cache-invalidation.md): Each PostgreSQL connection caches the catalog for itself. How a change is announced to all of them at commit through a shared ring, and what happens to a connection that falls behind. (2026-10-17; 19 min; part 5 of PostgreSQL internals, explained simply)

## Notes

- [Full-page writes and torn pages](https://sudohulk.com/writing/full-page-writes-and-torn-pages.md): Why the first change to a page after a checkpoint carries the whole 8 KB page in WAL. (note, evergreen; planted 2026-09-22)
- [Lazy transaction id assignment](https://sudohulk.com/writing/lazy-xid-assignment.md): A transaction does not get an xid at BEGIN; it gets one the first time it writes. (note, seedling; planted 2026-09-22)
- [pd_lsn vs record LSN](https://sudohulk.com/writing/pd-lsn-vs-record-lsn.md): Two LSNs that are easy to mix up, and the rule recovery uses to compare them. (note, budding; planted 2026-09-21)

## Projects

- [Smart Video Analysis](https://sudohulk.com/projects/smart-video-analysis.md): Event-processing microservices for video analysis events over Kafka and PostgreSQL, deployed with Docker, Terraform and GitHub Actions. (paused; kafka, postgresql, docker, terraform, github actions)
- [Distributed PostgreSQL](https://sudohulk.com/projects/distributed-postgresql.md): The internals of a horizontally scalable distributed PostgreSQL: sharding, distributed query execution, two-phase commit, and moving shards while the cluster serves. (active; c, postgresql, libpq, distributed systems)
