Re: Trigger to create automated range partition table

Поиск
Список
Период
Сортировка
От Keith
Тема Re: Trigger to create automated range partition table
Дата
Msg-id CAHw75vvsSCGxWSZMj0cBN-brVVwDZ-N1kvnZ7Bx=F-jpMNbP4g@mail.gmail.com
обсуждение исходный текст
Ответ на Trigger to create automated range partition table  (bhanu prabhakar <bhanu1208@gmail.com>)
Ответы Re: Trigger to create automated range partition table
Список pgsql-admin


On Tue, Nov 20, 2018 at 10:42 PM bhanu prabhakar <bhanu1208@gmail.com> 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.


Keith

В списке pgsql-admin по дате отправления:

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: PostgreSQL 10.5 : Logical replication timeout results in PANIC inpg_wal "No space left on device"
Следующее
От: legrand legrand
Дата:
Сообщение: Re: Trigger to create automated range partition table