GitLab deletes 4 TB PostgreSQL table on replicas
Dropping a massive 4 TB table in PostgreSQL requires balancing file unlinking costs, lock queue contention, and replication lag. The author evaluates different approaches—including standard DROP TABLE, TRUNCATE, partition dropping, batch deletion, and copying surviving rows into a new table—and concludes that partitioning or row-copying can mitigate the severe replay pauses observed on replicas. Open article →