Re: Add SPLIT PARTITION/MERGE PARTITIONS commands - Mailing list pgsql-hackers

From Dmitry Koval
Subject Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date
Msg-id 232439a3-af7a-4a13-82ae-33da5520d4bf@postgrespro.ru
Whole thread
In response to Re: Add SPLIT PARTITION/MERGE PARTITIONS commands  (Pavel Borisov <pashkin.elfe@gmail.com>)
Responses Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
List pgsql-hackers
Hi!

If we exclude case with DEFAULT partition, MERGE PARTITIONS command was
intended to be used when an incorrect table partitioning was chosen.
For example, a table was initially partitioned by month, but later we
needed to change table partitioning by quarter. In this case, MERGE
PARTITIONS command should merge several adjacent partitions into one.
Current checks are made for this case.

 >- If there's *no* default partition, then I think the check should be
 >relaxed; it's sufficient to verify that the bounds of the merged
 >partition do not overlap with any partition which is not being merged;

It's probably possible to do this. But in this case, the command will
not exactly be "MERGE PARTITIONS" ("MERGE PARTITIONS & EXPAND"?).

-- 
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com




pgsql-hackers by date:

Previous
From: Hüseyin Demir
Date:
Subject: Re: Add autovacuum_warning to surface concurrent vacuum collisions
Next
From: Antonin Houska
Date:
Subject: Re: CLUSTER progress: wrong index_rebuild_count for tables with TOAST