On Wed, 2021-03-03 at 08:49 +0530, dbatoCloud Solution wrote: > Someone guide me on partitioning, I used the declarative method( inheritance), > Created child tables, added check constraints and steps below which I mentioned it. > > step1 # > CREATE TABLE core.contact_transaction_history ( > > record_insert_datetime timestamp NULL, > crm_contact_type_id int4 NULL > ); > > step2# > CREATE TABLE core.contact_transaction_history_Year_2016() INHERITS (core.contact_transaction_history_PartMar2021); > CREATE TABLE core.contact_transaction_history_Year_2017() INHERITS (core.contact_transaction_history_PartMar2021); > CREATE TABLE core.contact_transaction_history_Year_2018() INHERITS (core.contact_transaction_history_PartMar2021); Don't use inheritance partitioning. Upgrade to a recent PostgreSQL release and use declarative partitioning. It is so much better when it comes to performance and maintenance costs. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com