Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
От | Zhihong Yu |
---|---|
Тема | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands |
Дата | |
Msg-id | CALNJ-vSuzLxR+tyCiLA4s8sznn_M8aXdSVSYx-Sxb5E9jUG+8A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands (Dmitry Koval <d.koval@postgrespro.ru>) |
Ответы |
Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
|
Список | pgsql-hackers |
On Wed, Jul 13, 2022 at 11:28 AM Dmitry Koval <d.koval@postgrespro.ru> wrote:
Hi!
Patch stop applying due to changes in upstream.
Here is a rebased version.
--
With best regards,
Dmitry Koval
Postgres Professional: http://postgrespro.com
Hi,
+attachPartTable(List **wqueue, Relation rel, Relation partition, PartitionBoundSpec *bound)
I checked naming of existing methods, such as AttachPartitionEnsureIndexes.
I think it would be better if the above method is named attachPartitionTable.
+ if (!defaultPartCtx && OidIsValid(defaultPartOid))
+ {
+ pc = createSplitPartitionContext(table_open(defaultPartOid, AccessExclusiveLock));
+ {
+ pc = createSplitPartitionContext(table_open(defaultPartOid, AccessExclusiveLock));
Since the value of pc would be passed to defaultPartCtx, there is no need to assign to pc above. You can assign directly to defaultPartCtx.
+ /* Drop splitted partition. */
splitted -> split
+ /* Rename new partition if it is need. */
need -> needed.
Cheers
В списке pgsql-hackers по дате отправления: