分区合并
最近更新时间: 2025-02-18 16:02:00
postgres=# alter table t_native_range merge partitions (t_native_range_minvalue_201706, t_native_range_201707) into partition t_native_range_minvalue_201707;
ALTER TABLE
postgres=# \d+ t_native_range
Table "tbase_pg_proc.t_native_range"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+-----------------------------+-----------+----------+---------+---------+--------------+-------------
f1 | bigint | | | | plain | |
f2 | timestamp without time zone | | | now() | plain | |
f3 | integer | | | | plain | |
Partition key: RANGE (f2)
Partitions: t_native_range_201708 FOR VALUES FROM ('2017-08-01 00:00:00') TO ('2017-09-01 00:00:00'),
t_native_range_201709 FOR VALUES FROM ('2017-09-01 00:00:00') TO ('2017-10-01 00:00:00'),
t_native_range_201710 FOR VALUES FROM ('2017-10-01 00:00:00') TO ('2017-11-01 00:00:00'),
t_native_range_minvalue_201707 FOR VALUES FROM (MINVALUE) TO ('2017-08-01 00:00:00'),
t_native_range_default DEFAULT
Distribute By: SHARD(f1)
Location Nodes: ALL DATANODES