Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6YU1-00DnXb-Oq for pgsql-general@arkaria.postgresql.org; Thu, 31 Oct 2024 16:57:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t6YU0-003dGn-1Z for pgsql-general@arkaria.postgresql.org; Thu, 31 Oct 2024 16:57:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6YTy-003dD5-Na for pgsql-general@lists.postgresql.org; Thu, 31 Oct 2024 16:57:16 +0000 Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6YTv-00420g-2a for pgsql-general@lists.postgresql.org; Thu, 31 Oct 2024 16:57:14 +0000 Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfhigh.phl.internal (Postfix) with ESMTP id BD90711401AC; Thu, 31 Oct 2024 12:57:08 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Thu, 31 Oct 2024 12:57:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1730393828; x=1730480228; bh=hQmu5x77/apci83bo6akuunvUI288he0FO0O0AHmTLk=; b= HXcFndnNA778o8nlk4HTYRDoS52BxTvcPFy2tbLcyAj4SbLpDOSix/oPDbYlCBiO H/OBadUEduItUJ7bkTEjg3F3rQVRSh+B1OjalarmqzGECU5CfmRCrnh8g9uJDA/v XQBSXrGsKYHkbk4ayT5VEdqo8ythGd6jCWg2vbwtpLBhLsL1+NnJ88J2hVp/T/Ks biz0yE25oR3pZQ3RSekThexQ6VqOB95eSmLvYhykmj1Mv+JmRKCGHliW46WU0g+o lafXemfZx7k4Vfj06OdB5hjrsGocnt7ybGNuA9b0abD0XzlyOhvLc+2nm41GuucC L23l+n1IXRfHcTPcWFIyBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1730393828; x=1730480228; bh=h Qmu5x77/apci83bo6akuunvUI288he0FO0O0AHmTLk=; b=AUgGIKS+P0H/MUqKM yvJYV9UcHefjGP2teup44orjGeceAz0XWBuS6Bsn1K09o0EhdHOFKDuFA4qFnvja ByFTXadw9POcq+Tao6rzRQvE/97G5xhAd2BfJpenEMfxbPPwLNoN+ajgN7kSfNvn jjMXT4Tg57hlJODhIpUyoHniKavSkFdgf70c8sAxV+Vw3RPuFTCZwd7dCunT0uaJ kZbT3NsFqXy7T0JhgGn7dG+OIeSBLOl4/3CUb9N73rmVztyzHkF4GlIjAQTUS0En 7T/Cx8rrKG75zJLQt9+9f9BXFbvXJWo5GRrUuWCWjhIq8+GMFc1NHDcYZ7Hj9KGA gNqNg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdekjecutefuodetggdotefrodftvfcurf hrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffrtefo kffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsuc dlqddutddtmdenogfuuhhsphgvtghtffhomhgrihhnucdlgeelmdenucfjughrpefkffgg fgfuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvg hruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgr thhtvghrnhepvdevgffgkefhuefhtdegfedtgeevuefhleegveehueehffeuheffieefke ffgfetnecuffhomhgrihhnpehsohhurhgtvghfohhrghgvrdhnvghtpdhpohhsthhgrhgv shhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggprhgt phhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehthhhivghmohesgh gvlhgrshhsvghnvgdqphhfvghruggvrdgsihiipdhrtghpthhtohepphhgshhqlhdqghgv nhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 31 Oct 2024 12:57:07 -0400 (EDT) Message-ID: Date: Thu, 31 Oct 2024 09:57:06 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Plans for partitioning of inheriting tables To: Thiemo Kellner , PostgreSQL General References: <5757acdc-39ed-4642-a449-26e47b1bcf95@gelassene-pferde.biz> Content-Language: en-US From: Adrian Klaver In-Reply-To: <5757acdc-39ed-4642-a449-26e47b1bcf95@gelassene-pferde.biz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/25/24 11:47, Thiemo Kellner wrote: > > Am 25.10.2024 um 17:57 schrieb Adrian Klaver: >> >>> I do not feel it applies to my case. I tried to create a partitioned >>> table that inherits columns from a base table. The documentation you >>> provided the URL seems to speak of realising partitioning by using >>> inheritance. >> >> This needs a code example to go any further. > > Sorry, my bad. I posted the URL of the table that is inherited from. The > recepient is > https://sourceforge.net/p/treintaytres/code/HEAD/tree/trunk/code_files/data_storage/PostgreSQL/tables/TOPO_FILES.pg_sqlcreate table if not exists TOPO_FILES ( > > SOURCE_ID uuid > constraint TOPO_FILES␟FK_01 > references SOURCES (ID) > match full > not null > ,FILE_NAME text > not null > ,TILE raster > not null > ,FILE_CREATION_PIT timestamp(6) with time zone > not null > ,FILE_HASH text > not null > ,constraint TOPO_FILES␟PK primary key (ID) > ,constraint TOPO_FILES␟UQ unique (SOURCE_ID > ,FILE_NAME) > ) > inherits(TEMPLATE_TECH); > -- partition by hash (source_id); --NOTE Up to PG 17, partitioning with inheriting table is not possible. It is just not the way you want to do it, see: https://www.postgresql.org/docs/current/ddl-partitioning.html#DDL-PARTITIONING-USING-INHERITANCE > > > The spender table ishttps://sourceforge.net/p/treintaytres/code/HEAD/tree/trunk/code_files/data_storage/PostgreSQL/tables/TEMPLATE_TECH.pg_sql > > create table if not exists TEMPLATE_TECH ( > ID uuid > constraint TEMPLATE_TECH␟PK primary key > not null > default gen_random_uuid() > ,ENTRY_PIT timestamp(6) with time zone > not null > default clock_timestamp() > ); > > -- Adrian Klaver adrian.klaver@aklaver.com