merge_chunks_concurrently()
Merge two or more chunks into one chunk without blocking reads
Since 2.18.0
Merge two or more chunks into one in concurrent mode without locking out other
reads. The functionality is equivalent to merge_chunks() with the
concurrently option set, although this procedure works with more than two
chunks. See merge_chunks() for more information.
Samples
Section titled “Samples”-
Merge three chunks, allowing concurrent reads:
CALL merge_chunks_concurrently('_timescaledb_internal._hyper_1_1_chunk', '_timescaledb_internal._hyper_1_2_chunk', '_timescaledb_internal._hyper_1_3_chunk');
Arguments
Section titled “Arguments”You can merge either two chunks, or an arbitrary number of chunks specified as an array of chunk identifiers.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
chunks | REGCLASS[] | - | ✖ | The array of chunks to merge in partition order |
Returns
Section titled “Returns”This procedure does not return a value. Upon successful completion, the specified chunks are merged into a single chunk.