Files
usenet-indexer/database
Daan MeijerandClaude Opus 5.5 9201e1200e
Test and deploy / test (push) Successful in 1m52s
Test and deploy / deploy (push) Skipped
files.id to 64 bits
Seeding adds ~14M files a day; 32-bit ids run out at 2.1 billion in about
five months. Postgres can't change a partition key's type, so the
migration detaches the partitions, rewrites each as a plain table (a CHECK
added first spares the attach scan), and attaches them to a new 64-bit
parent with the same indexes, foreign keys and triggers. binaries.file_id
and the id sequence become 64-bit too. Meant to run with the writers
stopped and Postgres on wal_level=minimal (compose: PG_WAL_LEVEL,
PG_MAX_WAL_SENDERS).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 16:46:53 +02:00
..
2026-10-05 16:46:53 +02:00
2026-10-05 16:46:53 +02:00