From: | Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru> |
---|---|
To: | jian he <jian(dot)universality(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands |
Date: | 2025-07-14 08:41:30 |
Message-ID: | 195b67ee-ef41-4451-9396-844442eef1a4@postgrespro.ru |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi!
1.
>this comment seems wrong?
>it should be "does this partitioned table (parent) have a default
>partition?
Agreed, this comment belongs to different code position. Corrected.
2.
>This error message is not good, IMHO. I don't really have any good
>ideas though.
>if we polish this message later, now we can add a comment: "FIXME
>improve this error message".
Probably it won't be possible to make the error message correct for both
MERGE PARTITIONS and SPLIT PARTITION.
I split code for MERGE PARTITIONS and SPLIT PARTITION and now error
messages are different for them.
3.
>after createPartitionTable->heap_create_with_catalog do the error check
>seems unintuitive to me.
>it can be checked right after RangeVarGetAndCheckCreationNamespace.
I agree that these error checks are unintuitive.
But the createPartitionTable function, which contains checks, will be
used in many places - not only for MERGE PARTITIONS, but also for SPLIT
PARTITION. I think it's not a good idea to do the same checks in
different places in code. Maybe it's better to do these checks in one
place (even though it's unintuitive)?
--
With best regards,
Dmitry Koval
Postgres Professional: http://postgrespro.com
Attachment | Content-Type | Size |
---|---|---|
v50-0001-Implement-ALTER-TABLE-.-MERGE-PARTITIONS-.-comma.patch | text/plain | 165.9 KB |
v50-0002-Implement-ALTER-TABLE-.-SPLIT-PARTITION-.-comman.patch | text/plain | 219.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2025-07-14 08:47:06 | Re: [WIP]Vertical Clustered Index (columnar store extension) - take2 |
Previous Message | Sutou Kouhei | 2025-07-14 08:38:03 | Re: Make COPY format extendable: Extract COPY TO format implementations |