From c0868966253218d83caeeac4bfd92ca6f4994537 Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Mon, 15 Jul 2024 13:11:51 +0900 Subject: Fix tablespace handling in MERGE/SPLIT partition commands. As commit ca4103025d stated, new partitions without a specified tablespace should inherit the parent relation's tablespace. However, previously, ALTER TABLE MERGE PARTITIONS and ALTER TABLE SPLIT PARTITION commands always created new partitions in the default tablespace, ignoring the parent's tablespace. This commit ensures new partitions inherit the parent's tablespace. Backpatch to v17 where these commands were introduced. Author: Fujii Masao Reviewed-by: Masahiko Sawada Discussion: https://postgr.es/m/abaf390b-3320-40a5-8815-ef476db5cfe7@oss.nttdata.com --- doc/src/sgml/ref/alter_table.sgml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index c062a36880d..6a2822adad7 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -1163,7 +1163,8 @@ WITH ( MODULUS numeric_literal, REM New partitions will have the same table access method as the parent. If the parent table is persistent then new partitions are created persistent. If the parent table is temporary then new partitions - are also created temporary. + are also created temporary. New partitions will also be created in + the same tablespace as the parent. @@ -1235,7 +1236,8 @@ WITH ( MODULUS numeric_literal, REM The new partition will have the same table access method as the parent. If the parent table is persistent then the new partition is created persistent. If the parent table is temporary then the new partition - is also created temporary. + is also created temporary. The new partition will also be created in + the same tablespace as the parent. -- cgit v1.2.3