2

I need to create a partitioned table with 4 rotating partitions for 4 days, and every day truncate the oldest partition.

I know how to create table partitions on postgres, but I can't understand how to arrange daily rotation of several partitions.

I'm on postgresql 9.6, Amazon RDS instance which means no pg_cron to be able to run daily truncating.

I could write a python script and schedule it in cron on a side micro instance, but I'd preper to use internal postgres tools only.

  • Are you using trigger to rotate table ? – Luan Huynh May 21 '18 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.