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.96) (envelope-from ) id 1waEzw-001d42-0K for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jun 2026 15:49:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1waEzu-00CIuO-2C for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jun 2026 15:49:42 +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.96) (envelope-from ) id 1waEzu-00CIuD-1C for pgsql-hackers@lists.postgresql.org; Thu, 18 Jun 2026 15:49:42 +0000 Received: from charmander.telsasoft.com ([50.244.222.1] helo=pryzbyj2023.telsasoft) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1waEzs-00000000zmA-40GV for pgsql-hackers@lists.postgresql.org; Thu, 18 Jun 2026 15:49:41 +0000 Received: by pryzbyj2023.telsasoft (Postfix, from userid 1000) id 06A51351D; Thu, 18 Jun 2026 10:49:39 -0500 (CDT) Date: Thu, 18 Jun 2026 10:49:38 -0500 From: Justin Pryzby To: Alexander Korotkov Cc: Pavel Borisov , Dmitry Koval , Alexander Lakhin , pgsql-hackers@lists.postgresql.org, Tomas Vondra , Alvaro Herrera Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jun 18, 2026 at 10:31:11AM +0300, Alexander Korotkov wrote: > Pushed with your suggestions accepted. Thanks. When I went back to test this, I merged ~25 partitions that were all on the same tablespace, but the merged table was created on the default tablespace. I tried again with default_tablespace set, but it was ignored. I think that's wrong. It's good to follow the tablespace of the parent table, but if it has no tablespace set, default_tablespace should be obeyed. See surrounding logic in DefineRelation. I see the docs say this: + ALTER TABLE MERGE PARTITION uses the partitioned + table itself as the template to construct the new partition. + The new partition will inherit the same table access method, persistence + type, and tablespace as the partitioned table. -- Justin