Skip to main content
Since 2.18.0 Merge two or more s into one. The partition boundaries for the new is the union of all partitions of the merged s. The new retains the name, constraints, and triggers of the first in the partition order. You can only merge s that have directly adjacent partitions. It is not possible to merge s that have another , or an empty range between them in any of the partitioning dimensions. merging has the following limitations. You cannot:
  • Merge s with tiered data
  • Read or write from the s while they are being merged

Samples

  • Merge two s:
    CALL merge_chunks('_timescaledb_internal._hyper_1_1_chunk', '_timescaledb_internal._hyper_1_2_chunk');
    
  • Merge more than two s:
    CALL merge_chunks('{_timescaledb_internal._hyper_1_1_chunk, _timescaledb_internal._hyper_1_2_chunk, _timescaledb_internal._hyper_1_3_chunk}');
    

Arguments

You can merge either two s, or an arbitrary number of s specified as an array of identifiers. When you call merge_chunks, you must specify either chunk1 and chunk2, or chunks. You cannot use both arguments.
NameTypeDefaultRequiredDescription
chunk1, chunk2REGCLASS-The two s to merge in partition order
chunksREGCLASS[]-The array of s to merge in partition order