Re: pg_restore --multi-thread - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pg_restore --multi-thread
Date
Msg-id 499EA2C5.50705@gmx.net
Whole thread Raw
In response to Re: pg_restore --multi-thread  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pg_restore --multi-thread  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan wrote:
> Cédric Villemain wrote:
>>
>>  -j [jobs], --jobs[=jobs]
>>   Specifies  the  number  of jobs (pg_restore) to run simultaneously. 
>> If the -j
>> option is given without an argument, pg_restore will not limit the 
>> number of
>> jobs that can run simultaneously.

> Quite apart from anything else, this description is almost 100% dead 
> wrong.  The argument is not optional at all, and there is no unlimited 
> parallelism. If you want to know how it actually works look at the dev 
> docs.

What I'm still missing here is a piece of documentation or a guideline 
that says when a given number of threads/jobs/workers would be 
appropriate.  For make -j, this is pretty clear: If you have N CPUs to 
spare, use -j N.  For pg_restore, this is not made clear:  Is it the 
number of CPUs on the client or the server or the number of disks on the 
client or the server or perhaps a combination of this or something else?


pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: GIN fast insert
Next
From: Heikki Linnakangas
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Start background writer during archive recovery.