Re: [HACKERS] pg_restore is broken on 9.2 version. - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: [HACKERS] pg_restore is broken on 9.2 version.
Date
Msg-id 20170207145104.GW9812@tamriel.snowman.net
Whole thread Raw
In response to [HACKERS] pg_restore is broken on 9.2 version.  (Rushabh Lathia <rushabh.lathia@gmail.com>)
Responses Re: [HACKERS] pg_restore is broken on 9.2 version.  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Greetings,

* Rushabh Lathia (rushabh.lathia@gmail.com) wrote:
> Commit c59a1a89035674c6efacc596d652528cebba37ec don't allow non-positive
> number
> of jobs. Now on 9.2 number of jobs get assigned to opts->number_of_jobs. If
> user don't specify any value -j then default value will be always 0. Which
> will
> lead to the "invalid number of parallel jobs" error.
>
>     if (opts->number_of_jobs <= 0)
>     {
>         fprintf(stderr, _("%s: invalid number of parallel jobs\n"),
> progname);
>         exit(1);
>     }
>
> Please find attach patch to initialize default value for number of jobs to
> 1.

Ugh.  This is what I get for thinking that our regression tests actually
test even the basic things.

That fix should go into NewRestoreOptions() where the other not-zero
settings go.

I'll fix it here in a few.

Thanks!

Stephen

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] 'text' instead of 'unknown' in Postgres 10
Next
From: Fujii Masao
Date:
Subject: Re: [HACKERS] DROP SUBSCRIPTION and ROLLBACK