Re: Partitioning existing table issue - Help needed! - Mailing list pgsql-admin

From Thomas Kellerer
Subject Re: Partitioning existing table issue - Help needed!
Date
Msg-id 156bd5b9-d9aa-cfc2-d584-a8dd82acaf66@gmx.net
Whole thread Raw
In response to Partitioning existing table issue - Help needed!  (dbatoCloud Solution <dbatocloud17@gmail.com>)
List pgsql-admin
dbatoCloud Solution schrieb am 04.02.2021 um 14:47:
> Dear All,
>
> I am partitioning the large table using declarative partitioning method in PostgreSQL 10.13.
>
>  1. created parent  table
>  2. create sub-partitioned table
>  3. created index for each partition
>  4. created function
>  5. creating trigger but end with below error:-
>
> SQL Error [42809]: ERROR: "contact_transaction_history_parent_part_bkp_am" is a partitioned table
>
>   Detail: Partitioned tables cannot have ROW triggers.

What do you need the trigger for?
And what does the trigger do?

If you insert into the parent table, Postgres will automatically store
the row in the appropriate partition.

Apart from the need to upgrade because row triggers on a partitioned table require Postgres 11,
you might want to consider upgrading to at least Postgres 12 anyway, as there were
substantial partitioning improvements in 11 and 12 (performance and usability wise)



pgsql-admin by date:

Previous
From: dbatoCloud Solution
Date:
Subject: Re: Partitioning existing table issue - Help needed!
Next
From: "Campbell, Lance"
Date:
Subject: Partitioning Tables