Re: pg_restore is broken on 9.2 version.

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_restore is broken on 9.2 version.
Date: 2017-02-07 15:17:37
Message-ID: 20170207151737.GZ9812@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Stephen Frost (sfrost(at)snowman(dot)net) wrote:
> Greetings,
>
> * Rushabh Lathia (rushabh(dot)lathia(at)gmail(dot)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.

Fix pushed.

Thanks!

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniele Varrazzo 2017-02-07 15:22:26 Re: 'text' instead of 'unknown' in Postgres 10
Previous Message Daniele Varrazzo 2017-02-07 15:16:53 Re: 'text' instead of 'unknown' in Postgres 10