Re: Partitioning existing table issue - Help needed!

From: Thomas Kellerer <shammat(at)gmx(dot)net>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Partitioning existing table issue - Help needed!
Date: 2021-02-05 14:50:35
Message-ID: 156bd5b9-d9aa-cfc2-d584-a8dd82acaf66@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Campbell, Lance 2021-02-05 18:27:31 Partitioning Tables
Previous Message dbatoCloud Solution 2021-02-05 14:01:56 Re: Partitioning existing table issue - Help needed!