Partitioning a live 800M-row Postgres table without downtime: the procedure we used
We moved an 800-million-row events table to monthly range partitions with a cutover lock of under a second. The trick was to attach the existing table as one big legacy partition, with every slow step done beforehand under weak locks.