~/talk

Turn back time:Converting integer fields to bigint using Django migrations at scale

Talkat DjangoCon Europe 2025 · 2025-04-23..04-27· [python, databases]
slides:none on file

Recommends using bigint from the start to avoid later pain and describes a safe, multi‑phase conversion that uses a shadow column plus triggers, runSQL migrations and a batch backfill (100k ID ranges) to avoid long exclusive locks. Reports concrete scale: 14 tables, 29 columns, 24 systems, 104 PRs, 95 migrations, 192 manual steps, largest table ~660M rows, five months of work. Ongoing work addresses bigint primary keys, a cron-driven backfiller that watches autovacuum, and a shadow table + pg_repack idea to avoid vacuuming.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 3:16Problem with 32-bit integer limits
  3. 8:07Naive migration approach and risks
  4. 10:52Three-phase migration process
  5. 16:54Lessons learned from first project
  6. 17:16Scaling primary keys to bigint
  7. 21:08Backfilling challenges and solutions
  8. 27:03Shadow table approach for vacuuming
  9. 28:06Key takeaways and conclusions
  10. 28:36Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.