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