Re: Partitioning existing table issue - Help needed!
От | Magnus Hagander |
---|---|
Тема | Re: Partitioning existing table issue - Help needed! |
Дата | |
Msg-id | CABUevEySrJ9yx__+KQ0_CUm1x84zgPdKydhf9wR+MWcyP5T6QQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Partitioning existing table issue - Help needed! (dbatoCloud Solution <dbatocloud17@gmail.com>) |
Ответы |
Re: Partitioning existing table issue - Help needed!
|
Список | pgsql-admin |
(please avoid top-posting, it makes the thread really hard to read) On Fri, Feb 5, 2021 at 1:04 PM dbatoCloud Solution <dbatocloud17@gmail.com> wrote: > > Thanks Magnus, > > I was able to create trigger for each partition now successfully. > > Now I tried to insert records from the old tableto newly created partition table but I am receiving the below error. > Comand # insert into core.contact_transaction_history_Parent_PART_BKP_AM select * from core.contact_transaction_history; > > SQL Error [54001]: ERROR: stack depth limit exceeded > Hint: Increase the configuration parameter "max_stack_depth" (currently 6144kB), after ensuring the platform's stackdepth limit is adequate. > Where: SQL statement "INSERT INTO core.contact_transaction_history_P_PART_BKP_Y2020_AM VALUES (NEW.*)" > PL/pgSQL function core.contact_transaction_history_parent_part_bkp_am_() line 14 at SQL statement > SQL statement "INSERT INTO core.contact_transaction_history_P_PART_BKP_Y2020_AM VALUES (NEW.*)" > PL/pgSQL function core.contact_transaction_history_parent_part_bkp_am_() line 14 at SQL statement > SQL statement "INSERT INTO core.contact_transaction_history_P_PART_BKP_Y2020_AM VALUES (NEW.*)" > PL/pgSQL function core.contact_transaction_history_parent_part_bkp_am_() line 14 at SQL statement > SQL statement "INSERT INTO core.contact_transaction_history_P_PART_BKP_Y2020_AM VALUES (NEW.*)" > PL/pgSQL function core.contact_transaction_history_parent_part_bkp_am_() line 14 at SQL statement > SQL statement "INSERT INTO core.contact_transaction_history_P_PART_BKP_Y2020_AM VALUES (NEW.*)" > PL/pgSQL function core.contact_transaction_history_parent_part_bkp_am_() line 14 at SQL statement > SQL statement "INSERT INTO core.contact_transaction_history_P_PART_BKP_Y2020_AM VALUES (NEW.*)" > PL/pgSQL function core.contact_transaction_history_parent_part_bkp_am_() line 14 at SQL statement This looks a lot like you may have created a trigger that actually fires recursively. What does your trigger actually do that would require that much stack? Can you post the code of the trigger? -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/
В списке pgsql-admin по дате отправления: