Managing PostgreSQL partitioned tables with Ruby
31-Oct-2019 1735
We use partitioned tables in our primary PostgreSQL database to efficiently expire old data, as deleting a bunch of data from a huge table can cause database performance to suffer. Prior to version 10, PostgreSQL didn't have native support for partitioned tables, so we used the pg_partman extension to implement partitioning. It works by using PostgreSQL's table inheritance to create child tables of the table that is to be partitioned and triggers to insert data into the child tables rather than the parent table. That extension has worked well for us, but it has a downside -- it isn't an option when you are using Amazon RDS, as it isn't supported. Now that that PostgreSQL has support for native partitions, I figured now was the time to see about dropping that extension so we'd have the option of using RDS.
Managing PostgreSQL partitioned tables with Ruby #ruby #rubydeveloper #rubyonrails #Managing #PostgreSQL #partitioned #tables https://www.rubyonrails.ba/link/managing-postgresql-partitioned-tables-with-ruby