Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

From: Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: 2024-03-27 20:18:00
Message-ID: a83d5a56-ff33-47e8-b2d8-7e9a5d59ee1e@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2024-03-27 20:43:41 Re: Streaming I/O, vectored I/O (WIP)
Previous Message Melanie Plageman 2024-03-27 20:15:23 Re: Use streaming read API in ANALYZE