Re: Support specify tablespace for each merged/split partition

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Junwang Zhao <zhjwpku(at)gmail(dot)com>, Amul Sul <sulamul(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Support specify tablespace for each merged/split partition
Date: 2024-08-07 13:54:40
Message-ID: 86b87f2d-4639-436b-a906-910931f7d412@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2024/08/06 19:28, Junwang Zhao wrote:
> Attached v2 addressed all the problems you mentioned, thanks.

Thanks for updating the patches!

In the ALTER TABLE documentation, v1 patch updated the syntax, but the descriptions for MERGE and SPLIT should also be updated to explain the tablespace of new partitions.

+ char *tablespacename; /* name of tablespace, or NULL for default */
PartitionBoundSpec *bound; /* FOR VALUES, if attaching */

This is not the fault of v1 patch, but the comment "if attaching" seems incorrect.

I also noticed the comment for SinglePartitionSpec refers to a different struct name, PartitionDesc. This should be corrected, and it might be better to include this fix in the v2 patch.

- * PartitionCmd - info for ALTER TABLE/INDEX ATTACH/DETACH PARTITION commands
+ * PartitionCmd - info for ALTER TABLE/INDEX ATTACH/DETACH/MERGE/SPLIT PARTITION commands

How about changing it to "info for ALTER TABLE ATTACH/DETACH/MERGE/SPLIT and ALTER INDEX ATTACH commands" for more precision?

- RangeVar *name; /* name of partition to attach/detach */
+ RangeVar *name; /* name of partition to
+ * attach/detach/merge/split */

In the case of MERGE, it refers to the name of the partition that the command merges into. So, would "merge into" be more appropriate than just "merge" in this comment?

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2024-08-07 13:55:36 Re: Fsync (flush) all inserted WAL records
Previous Message Daniel Gustafsson 2024-08-07 13:49:37 Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?