Skip to content

Commit 3b4d4eb

Browse files
authored
fast_import.rs: log number of jobs for pg_dump/pg_restore (neondatabase#12068)
## Problem I have a hypothesis that import might be using lower number of jobs than max for the VM, where the job is running. This change will help finding this out from logs ## Summary of changes Added logging of number of jobs, which is passed into both `pg_dump` and `pg_restore`
1 parent f060537 commit 3b4d4eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compute_tools/src/bin/fast_import.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ async fn run_dump_restore(
339339
destination_connstring: String,
340340
) -> Result<(), anyhow::Error> {
341341
let dumpdir = workdir.join("dumpdir");
342+
let num_jobs = num_cpus::get().to_string();
343+
info!("using {num_jobs} jobs for dump/restore");
342344

343345
let common_args = [
344346
// schema mapping (prob suffices to specify them on one side)
@@ -354,7 +356,7 @@ async fn run_dump_restore(
354356
"directory".to_string(),
355357
// concurrency
356358
"--jobs".to_string(),
357-
num_cpus::get().to_string(),
359+
num_jobs,
358360
// progress updates
359361
"--verbose".to_string(),
360362
];

0 commit comments

Comments
 (0)