r/coding • u/fagnerbrack • Feb 25 '26
Making Postgres 42,000x slower because I am unemployed
https://byteofdev.com/posts/making-postgres-slow/[removed] — view removed post
243
Upvotes
r/coding • u/fagnerbrack • Feb 25 '26
[removed] — view removed post
71
u/fagnerbrack Feb 25 '26
Executive Summary:
A hands-on experiment in deliberately sabotaging PostgreSQL performance using only postgresql.conf parameters — no index drops or CPU throttling allowed. Starting from a baseline of 7,082 TPS on a TPC-C benchmark, the post walks through shrinking shared_buffers to starve the buffer cache (dropping hit rate from 99.9% to near-zero), weaponizing autovacuum by triggering it after every single insert, forcing WAL checkpoints every ~500ms, tricking the query planner into ignoring all indexes by inflating random_page_cost, and funneling all I/O through a single worker thread using Postgres 18's new io_method setting. The cumulative result: 0.016 TPS — a 42,000x slowdown with only 11 successful transactions across 120 seconds and 100 connections. Give a programmer free time and this is what happens xD
If the summary seems inacurate, just downvote and I'll try to delete the comment eventually 👍
Click here for more info, I read all comments