Idea for improving speed of pg_restore - Mailing list pgsql-general

From Ron Johnson
Subject Idea for improving speed of pg_restore
Date
Msg-id 1063669983.11720.1292.camel@haggis
Whole thread Raw
List pgsql-general
Hi,

While on the topic of "need for in-place upgrades", I got to think-
ing how the pg_restore could be speeded up.

Am I wrong in saying that in the current pg_restore, all of the
indexes are created in serial?

How about this new, multi-threaded way of doing the pg_restore:
0. On the command line, you specify how many threads you want.
1. pg_restore creates the metadata.
2. pg_restore creates a set of streams/children that have the table
   loads and index-creates (PKs and "regular" indexes), where each
   streams does a set of tables.
3. pg_restore waits for all the streams to complete.
4. pg_restore then creates the FKs, stored procedures, triggers,
   etc, etc.

Pardon if this has already been suggested and shot down as impossible
or too difficult, etc.

--
-----------------------------------------------------------------
Ron Johnson, Jr. ron.l.johnson@cox.net
Jefferson, LA USA

"Why should we not accept all in favor of woman suffrage to our
platform and association even though they be rabid pro-slavery
Democrats."
Susan B. Anthony, _History_of_Woman_Suffrage_
http://www.ifeminists.com/introduction/essays/introduction.html


pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: State of Beta 2
Next
From: "Joshua D. Drake"
Date:
Subject: Re: [PORTS] plPHP for windows