4 ms·
pg_partman is awesome. The SQL syntax for partitioning isn't dissimilar to your example (since PG11?), but like you say, it's the automatic creation and cleanup
by boomskats 4y ago
pg_partman is awesome. The SQL syntax for partitioning isn't dissimilar to your example (since PG11?), but like you say, it's the automatic creation and cleanup of partitions that's it's missing. pg_partman used to have to do a lot more things, but nowadays you can just have it do the job of creating X future partitions for you at a given interval, and truncating partitions older than retention period Y.
It's a great extension. We have used it in production for a few years now, as part of a commercial on-prem observability tool (an app that keeps around 1TB of data at any one time, written at avg 15mb/sec, maybe 500ish partitions, user configurable retention strategy). It is extremely reliable. Support for Keith F working on it is one of the reasons I like Crunchy.
edit: I clearly didn't read the link before writing this