Skip to main content

copy_table

Function copy_table 

Source
pub async fn copy_table(
    src: &PgClient,
    dst: &PgClient,
    table: &TableName,
    columns: &[String],
    buffer_size: usize,
    metrics: &Arc<Metrics>,
) -> Result<CopyStats>
Expand description

Stream table from src (inside its snapshot transaction) into dst (inside the caller’s target transaction) with COPY ... TO STDOUT / COPY ... FROM STDIN. Memory is bounded by buffer_size plus one server chunk.