- Merge s with tiered data
- Write to s that are being merged
Concurrent mode
When a merge is executed using theconcurrently option, other processes can
simultaneously read from the s being merged and insert into other s.
The merge happens across two transactions: the first one rewrites the s
into a temporary relation without taking any locks that prevent reads, while
the second transaction locks out all other operations before swapping the old
relations for the new one. The second operation completes quickly so it
should not significantly affect other operations.
Samples
-
Merge two s:
-
Merge more than two s:
-
Merge two s concurrently, allowing reads:
Arguments
The syntax is:merge_chunks, you must specify either chunk1 and chunk2, or chunks. You cannot use both
arguments.
The concurrently option is only available for the two-chunk overload. To merge an array of s concurrently,
use merge_chunks_concurrently() instead.