DATABASES Signal 482
PGSimCity visualizes PostgreSQL 18 internals as an interactive 3D city in the browser
PGSimCity is an open-source educational tool that renders PostgreSQL cluster mechanics as a 3D spatial simulation in the browser, helping developers and SREs understand SQL execution and kernel dynamics.
For backend developers and site reliability engineers, PGSimCity offers a concrete way to see how PostgreSQL processes queries and handles operational failures, bridging the gap between high-level SQL and low-level kernel execution. It runs entirely in the browser without local dependencies, making it accessible for learning and experimentation. The tool also lets users trigger pathological scenarios like checkpoint storms and table bloat to observe engine failure modes directly.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
PGSimCity maps PostgreSQL 18 internals to municipal districts, with client connections entering via the Postmaster and worker processes along backend avenue.
The simulation decouples three.js rendering from core state transitions, using isolated TypeScript state machines to keep internal state consistent regardless of frame rate.
Users can trigger operational pathologies such as low shared_buffers, restricted work_mem, long-running transactions, and heavy write bursts to inspect engine failure modes.
THE CLUSTER
↗