Nikolay Samokhvalov has launched PGSimCity, an open-source educational visualization tool. This application transforms the complex mechanics of a PostgreSQL cluster into an interactive 3D spatial simulation. It operates entirely within a web browser, requiring no local dependencies, and is available through the PGSimCity Live Visualisation sandbox.
PGSimCity aims to bridge the conceptual divide between high-level SQL queries and low-level kernel execution. It is designed for backend developers, site reliability engineers, and database architects to gain a clearer understanding of how PostgreSQL operates internally. The tool abstracts PostgreSQL 18 internals into distinct municipal districts, defined in its source code.
The simulation depicts client connections entering the Postmaster supervisor, which then forks worker processes. Key PostgreSQL components like the shared_buffers pool, wal_buffers, ProcArray, lock tables, and Commit Log (CLOG) are represented as central city elements. Storage structures, including 8 KB page fields, B-trees, Free Space Maps (FSM), and Visibility Maps (VM), are visualized as excavations. Write-Ahead Logging (WAL) is routed to an eastern district with walwriter and walsender threads, while maintenance workers like checkpointer, bgwriter, and autovacuum reside in a western yard.
PGSimCity allows users to trace statement lifecycles through parse, rewrite, plan, and execute stages. Database engineers and SREs can trigger operational pathologies, such as setting shared_buffers to 16 MB to force clock-sweep eviction races or restricting work_mem to cause temporary file spills. The tool also simulates long-running transactions leading to autovacuum starvation and table bloat, and heavy write bursts that trigger checkpoint storms.
The project maintains architectural fidelity by decoupling three.js rendering from core state transitions, ensuring internal state consistency regardless of frame rate. Samokhvalov noted that the initial prototype was built using multi-billion-token LLM prompting. The release has generated discussion on Hacker News regarding AI-assisted software architecture visualization and cognitive load.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
Nikolay Samokhvalov released PGSimCity, an open-source tool that converts PostgreSQL cluster mechanics into an interactive 3D spatial simulation accessible in a browser. This tool helps backend developers, site reliability engineers, and database architects understand the connection between SQL queries and kernel execution by visualizing PostgreSQL 18 internals as a city.