Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Дата
Msg-id CAPpHfdsVQwnZPxaQPwcu1g_01F0d-o=ECRcf14X3CmavJB6vSQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add SPLIT PARTITION/MERGE PARTITIONS commands  (Dmitry Koval <d.koval@postgrespro.ru>)
Ответы Re: Add SPLIT PARTITION/MERGE PARTITIONS commands  (Dmitry Koval <d.koval@postgrespro.ru>)
Список pgsql-hackers
On Tue, Mar 19, 2024 at 4:43 PM Dmitry Koval <d.koval@postgrespro.ru> wrote:
> Thanks for info!
> I was unable to reproduce the problem and I wanted to ask for
> clarification. But your message was ahead of my question.

I've revised the patchset.  I mostly did some refactoring, code
improvements and wrote new comments.

If I apply just the first two patches, I get the same error as [1].
This error happens when createPartitionTable() tries to copy the
identity of another partition.  I've fixed that by skipping a copy of
the identity of another partition (remove CREATE_TABLE_LIKE_IDENTITY
from TableLikeClause.options).   BTW, the same error happened to me
when I manually ran CREATE TABLE ... (LIKE ... INCLUDING IDENTITY) for
a partition of the table with identity.  So, this probably deserves a
separate fix, but I think not directly related to this patch.

I have one question.  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?

Links.
1. https://www.postgresql.org/message-id/171085360143.2046436.7217841141682511557.pgcf%40coridan.postgresql.org

------
Regards,
Alexander Korotkov

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: add AVX2 support to simd.h
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: [HACKERS] make async slave to wait for lsn to be replayed