Re: pg_restore --multi-thread

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_restore --multi-thread
Date: 2009-02-12 16:12:35
Message-ID: 49944A73.6030206@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:
> I know we've already had a discussion on the naming of the pg_restore -m
> option, but in any case this description in pg_restore --help is confusing:
>
> -m, --multi-thread=NUM use this many parallel connections to restore
>
> Either it is using that many threads in the client, or it is using that many
> connections to the server. I assume the implementation does approximately
> both, but we should be clear about what we promise to the user. Either:
> Reserve this many connections on the server. Or: Reserve this many threads
> in the kernel of the client. The documentation in the reference/man page is
> equally confused.
>
> Also, the term "multi" is redundant, because whether it is multi or single is
> obviously determined by the value of NUM.
>
>

The implementation is actually different across platforms: on Windows
the workers are genuine threads, while elsewhere they are forked
children in the same fashion as the backend (non-EXEC_BACKEND case). In
either case, the program will use up to NUM concurrent connections to
the server.

I'm not sure what you mean about reserving threads in the client kernel.

I also don't really understand what is confusing about the description.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-02-12 16:20:26 Re: WIP: hooking parser
Previous Message Heikki Linnakangas 2009-02-12 16:05:01 Re: Writing and Reading bytea