Partitioning is a handy tool for managing size and performance as your database scales. Elizabeth offers a tutorial of native partitioning and pg_partman using a sample IoT dataset. This tutorial contains the sql and steps for you to try out partitioning yourself with Postgres.
The ultimate goal for any unplanned database interruption is to reduce data loss. So the advice here is aimed at someone in a production situation prioritizing minimizing data loss.
What follows is a summary of conversations I've had with customers on how to think about key tenants of database management, high availability and disaster recovery.