Automate partition maintenance on postgres without any script on primary detach 3months partition at same time 4 months partition detach partition from replica on postgres rds.
Thanks
Sathish Reddy
Take a look at the pg_partman extension. It automates new child table creation for time-based partitioning and can set retention rules as well