How to Make PostgreSQL Ridiculously Slow?

This article challenges the reader to make PostgreSQL as slow as possible by tweaking parameters in the `postgresql.conf` file, without resorting to CPU throttling or index deletion. Through a series of carefully chosen adjustments, including drastically reducing the buffer cache size (`shared_buffers`), aggressively triggering autovacuum and analyze (`autovacuum_*` parameters), and configuring WAL (`wal_*` parameters) for maximal write frequency and I/O contention, the author manages to reduce PostgreSQL's TPS by over 7000 times, from 7000+ to below single digits, even under 0.1 TPS. The author details the rationale and impact of each parameter change and provides a reproducible configuration. This is a fascinating experiment showcasing the profound impact of database parameter tuning.
Read more