On Tue, Nov 20, 2018 at 10:42 PM bhanu prabhakar <bhanu1208@xxxxxxxxx> wrote:
Hi friends,As a part of migration from Oracle to AWS Aurora postgress. I have converted the partition table using ora2pg tool.In Oracle we have feature of automated partition table creation when we insert the data, but in postgress 10.4 that feature is not enabled.Kindly help me and give some rough idea or example to create a trigger on table to create automated partition table when we insert the data.Thank youBhanu P Murari.
It is not recommended that table creation for partitions be done via triggers at this time unless the write level on the table is very, very low. Since DDL is transactional in PostgreSQL, this can cause contention on very active tables when that new child table is created.
I maintain an extension called pg_partman that can help with the automatic pre-creation of child tables before they are needed for time & serial/id based partition sets.
Keith