Re: pg_restore -j - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pg_restore -j
Date
Msg-id 200904230149.15537.peter_e@gmx.net
Whole thread Raw
In response to pg_restore -j  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
On Thursday 23 April 2009 01:26:04 Alvaro Herrera wrote:
> I just noticed (!) that Make accepts an argument-less -j option, which
> it takes to mean "use as many parallel jobs as possible".  As far as I
> see in our pg_restore code, we don't even accept an argumentless -j
> option; was this deviation from the Make precedent on purpose, or were
> we just not following Make at all on this?

There was likely no strong intention to follow make on this.  A small problem 
would be that getopt doesn't portably support single-letter options with 
optional arguments.

The main problem, however, is that make -j is pretty useless and dangerous.  
Using it on a large parallel-make-safe project can easily lock up (thrash) 
your machine.  make -j together with -l (--load-average) is kind of useful, I 
guess, but exactly how "load average" translated to a PostgreSQL database 
system is to be determined.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_restore -j
Next
From: Peter Eisentraut
Date:
Subject: GCC 4.4 compiler warnings