Getting rid of a 4 TB table in PostgreSQL

· Radim Marek · Oct. 31, 2026, 10:08 p.m.
Summary
In this blog post, the author discusses practical methods for safely dropping a massive 4 TB archival table in PostgreSQL across a primary and ten replicas. The author shares insights from personal tests measuring the drop's impact on write-ahead logs, replica recovery times, and different filesystem performances. The piece emphasizes understanding locks and replication behaviors while proposing strategies for mitigating potential disruptions, including renaming tables, short lock timeouts, and leveraging partitioning for better management of large data sets.
AUTHOR