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 1rpZiq-007OuT-DC for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Mar 2024 20:18:09 +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 1rpZip-00240n-E9 for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Mar 2024 20:18:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rpZip-00240e-0g for pgsql-hackers@lists.postgresql.org; Wed, 27 Mar 2024 20:18:07 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rpZik-006l3J-8r for pgsql-hackers@lists.postgresql.org; Wed, 27 Mar 2024 20:18:05 +0000 Received: from [172.30.2.66] (unknown [172.30.2.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: d.koval@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id AF0B8E20E8C; Wed, 27 Mar 2024 23:17:59 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1711570679; bh=OYkVvb2s2cx0T4IUXS3PA/qIJp3T5/XdqcFNe+uRN4o=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=N2rvtWXpAebLJy/R6JdnfvlhgOKZUOdn0ETw+33MJhCOPM2wfIJCV564J3SwevcBD SAQS069I125Sj8nVkLYwxDSRWoo6w3dI/aMmsfJYvh5VJ69P9lWpovdX5o26d8m6if MdOnmV+ZcOARQ30ljlZGhM2kniBK3Ww17YgMwRepVfjE9OwW0ysaDX3woUWlIl3gqa hDLQV34noN1j+GyjOafAikuJkar8zYYipXF4pJixGPCWvXlSfRL+9SpCQrCAVQlIV2 xWfL+vLpZSSwvPzzx0oJ9l155nKx9vQP/95r+IIToifjsknVcwDR2s8YIh3G1B02xk tCSgk8DIa3lOA== Message-ID: Date: Wed, 27 Mar 2024 23:18:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: Alexander Korotkov Cc: pgsql-hackers@lists.postgresql.org References: <171085360143.2046436.7217841141682511557.pgcf@coridan.postgresql.org> <171085858750.2046434.12246066729700037354.pgcf@coridan.postgresql.org> <909e16b4-9eda-435c-b033-8294ae4adc05@postgrespro.ru> Content-Language: en-US From: Dmitry Koval In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi! > I've fixed that by skipping a copy of the identity of another > partition (remove CREATE_TABLE_LIKE_IDENTITY from > TableLikeClause.options). Thanks for correction! Probably I should have looked at the code more closely after commit [1]. I'm also very glad that situation [2] was reproduced. > When merging partitions you're creating a merged partition like the > parent table. But when splitting a partition you're creating new > partitions like the partition being split. What motivates this > difference? When splitting a partition, I planned to set parameters for each of the new partitions (for example, tablespace parameter). It would make sense if we want to transfer part of the data of splitting partition to a slower (archive) storage device. Right now I haven't seen any interest in this functionality, so it hasn't been implemented yet. But I think this will be needed in the future. Special thanks for the hint that new structures should be added to the list src\tools\pgindent\typedefs.list. Links. [1] https://github.com/postgres/postgres/commit/699586315704a8268808e3bdba4cb5924a038c49 [2] https://www.postgresql.org/message-id/171085360143.2046436.7217841141682511557.pgcf%40coridan.postgresql.org -- With best regards, Dmitry Koval Postgres Professional: http://postgrespro.com