Can someone guide to automate LIST partitioning to a new table in rds postgres v12.10. At runtime I can get different values of the partition key. How can U automate this
Asked
Active
Viewed 29 times
-1
-
What about the PostgreSQL manual? – Frank Heikens Apr 22 '23 at 19:26
-
Is this really your last resort after coming up blank with the rest of the internet? – Stu Apr 22 '23 at 19:50
-
not able to find a single resource to automate list partitioning in rds – Mohit Singla Apr 22 '23 at 19:59
-
Just run a cron job and you’re done. Many other comparable options available as well – Frank Heikens Apr 22 '23 at 20:02
1 Answers
0
I guess that you want partitions to be created as you insert data. You cannot do that in PostgreSQL. Perhaps an ugly workaround like in this article can help: Have a trigger that creates the target table if it does not yet exist and notifies a special worker process that attaches the newly created table as a partition.

Laurenz Albe
- 209,280
- 17
- 206
- 263