Catalogue / fireside-2024-postgres-table-swap

Fireside.fm shrinks an overgrown 57 GB Postgres downloads table in 10 seconds with a clone-and-rename swap

Fireside.fm, 2024. Fireside.fm application Postgres database (podcast download analytics tables).

Organisation
Fireside.fm
Evidence
Reported from production
Source
Shrinking a Postgres Table

johnnunemaker.com, published 2024-11-28

Records

Decision#d1

Shrink a 57 GB uncleaned staging table by cloning, copying recent rows, renaming and dropping the old table

Sign in to read what was chosen, what was rejected and what it cost, each with its place in the source. An account is free.