Initialize number_of_jobs in NewRestoreOptions
authorStephen Frost <sfrost@snowman.net>
Tue, 7 Feb 2017 15:17:02 +0000 (10:17 -0500)
committerStephen Frost <sfrost@snowman.net>
Tue, 7 Feb 2017 15:17:02 +0000 (10:17 -0500)
Now that we're checking that the number_of_jobs passed in isn't zero or
negative, we need to actually initialize number_of_jobs to '1' when it
isn't set.

Pointed out by Rushabh Lathia, though not his patch.

Discussion: https://postgr.es/m/CAGPqQf2u1T3J=ANhCw1CuvzqjD80oWvMg2-2wmfG08gCm9hhHA@mail.gmail.com

src/bin/pg_dump/pg_backup_archiver.c

index 45e90140126ac24f37b4b07fcf1608a797022558..41cb89692a2bdfb380830849eaf0c49544aefac6 100644 (file)
@@ -780,6 +780,7 @@ NewRestoreOptions(void)
        opts->format = archUnknown;
        opts->promptPassword = TRI_DEFAULT;
        opts->dumpSections = DUMP_UNSECTIONED;
+       opts->number_of_jobs = 1;
 
        return opts;
 }