Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l82RX-0000Te-3U for pgsql-admin@arkaria.postgresql.org; Fri, 05 Feb 2021 14:50:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l82RW-0005UY-0K for pgsql-admin@arkaria.postgresql.org; Fri, 05 Feb 2021 14:50:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l82RV-0005UR-Nl for pgsql-admin@lists.postgresql.org; Fri, 05 Feb 2021 14:50:41 +0000 Received: from mout.gmx.net ([212.227.17.22]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l82RT-0001n6-5X for pgsql-admin@lists.postgresql.org; Fri, 05 Feb 2021 14:50:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1612536637; bh=DVqxiLMX7QctY7zstq7Pl1gB8+ydniZ7R73XO4dGCoU=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=FXYnk406IUyKqKVvjsnhyzTRZNeF3bUgRWhJGcqwgw/YU1AJ3eNPVui3VX84541vK IrDrdTJhyaN7QsXbypCrPzMZyCTDgJYIcThbI6AL1WUKVqzHJl6fvtT0eCsbuCHLnE c8W4ojKMCuVm5rGR+ZTBcI+RacMvixY8SANuWCuc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [10.1.32.18] ([185.40.248.10]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MryXN-1lkQ360bbh-00nzxw for ; Fri, 05 Feb 2021 15:50:37 +0100 Subject: Re: Partitioning existing table issue - Help needed! To: pgsql-admin@lists.postgresql.org References: From: Thomas Kellerer Message-ID: <156bd5b9-d9aa-cfc2-d584-a8dd82acaf66@gmx.net> Date: Fri, 5 Feb 2021 15:50:35 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:bnH31YEiOYuY3/feUEBsYAVuskTDj0Vhe4+ZbzpRTgDFT9c2bZh 9x+1mFazc9EofiBwvKuF97JbkUShXHTibW2oLQPwWE9bcF/CB4N7fRLpQn0RgR6aUypi6d4 zKJEhnkTQ1WeY0nl337YfH4KhVwcKQi+z7qUmHmW5Hfi9GjqpoVRHblN1R0YDDU426CrzSz 59vhvbckQYOhbC1ntkB0Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:mzGeAIn50E4=:VWSn2rsa5wM1jPH32ikw8U 1bUx5zHvMqSrO61Jh2r/vYK4N0nC0AUEIy69dYbCo6dbqGY8oZSX+s91p1nvftblm26QO49Jl J/F0CrOWZ/w+magfhL2UjtCeTb1JBrWvAhztwrCvCYR9OeT+k6eGlDuqrrloQ4qqHHUYGQyXd EriYxhdmwBzPDtVrc+4CHjXoO5USiIr6vHja3FAuMa+UGnsJtblVBZk4U1w3v8tadfyrnFruY yVSL0JFJGWc1pSN0UZDukzU2SyDQ7bxSyKPTs3bSJilVffP5UOSUpJ3QYjC6xTPuNsv8GaHYy kSg43qiChDhrg9ZNhbEpbOyG9NM2NJRSLJyt7U+PItBoNB4R+NUelACyRE8DN667CM1Ie9iJD iV3LzYcHoG85IuuqKUDXYfF3J9bcdEbPcxe058Uner6oVOFLtRGbz8zJD1T8/Y61fcV5iYtUX g2tcTEBz4PET1E16JbnD4vlEA6jVtF14ahhnI6jJvmhtuzpjIE2rZdBbyv42UnX4N+x9iwvvE FeysUzxS9KW08YHNrmpFPUhd2ZVldpeGN21QBnsUbqVvarZCtJ1sao91feieQTPhgqlrh7a3U jGLs1dbi/mfV2oi9xqgksV7XQXWySOlRroYLl/15880K9nS6K8/wFeFmiB/osy0pTvO5uMxXK w7jv70etEtqwhzhOy2g9LYWjNMd+YUOtddfVfbvEPqgj+zIIlykzhIRZ7WwrLwF/YYLA0Fr3O ZHZd0sfpuqSPcH6rIE+7d18lrofamfaBc/Srsdd4ffpgGyRfel+3dRuTkIi2oi1A9sy5Qx6Vi szxkdDwxZiwOphal5Vkm2m6nqylD9pfbwQ77nDuOqW2Xj8Fo6tCDXOnmFE/u+vPlxSiKyDCKF XS57x66O0ExlpHDbg5IQ== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 =C2=A0table > 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_a= m" is a partitioned table > > =C2=A0 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 th= ere were substantial partitioning improvements in 11 and 12 (performance and usabil= ity wise)