Re: Trigger to create automated range partition table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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 you 

Bhanu 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.

https://github.com/pgpartman/pg_partman

Keith
http://www.keithf4.com

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux