Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vv7Ho-0007RE-Pi for pgsql-admin@arkaria.postgresql.org; Mon, 23 Dec 2013 15:19:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vv7Ho-0006az-47 for pgsql-admin@arkaria.postgresql.org; Mon, 23 Dec 2013 15:19:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vv7Hn-0006aq-20 for pgsql-admin@postgresql.org; Mon, 23 Dec 2013 15:19:15 +0000 Received: from eth5.brad-fw.brad.office.ccanet.co.uk ([178.255.87.226] helo=ian.brad.office.comodo.net) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vv7He-0004Rm-5y for pgsql-admin@postgresql.org; Mon, 23 Dec 2013 15:19:14 +0000 Received: (qmail 4104 invoked by uid 1000); 23 Dec 2013 15:19:04 -0000 Received: from mahdell.brad.office.comodo.net (HELO mahdell.localnet) (192.168.0.228) by ian.brad.office.comodo.net (qpsmtpd/0.40) with (AES256-SHA encrypted) ESMTPS; Mon, 23 Dec 2013 15:19:04 +0000 From: Mike Williams To: pgsql-admin@postgresql.org Subject: pg_restore >10million large objects Date: Mon, 23 Dec 2013 15:19:03 +0000 Message-ID: <8431385.HKVqUUWTfq@mahdell> User-Agent: KMail/4.10.5 (Linux/3.10.7-gentoo; KDE/4.10.5; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hi all, There have been some questions about pg_dump and huge numbers of large objects recently. I have a query about the opposite. How can restoring a database with a lot of large objects run faster? My database has a relatively piddling 13 million large objects, so dumping it isn't a problem. Restoring it is a problem though. This is for a migration from 8.4 to 9.3. The dump is taken using pg_dump from 9.3. I've run a test on a significantly smaller test system. ~4GB overall, and 1.1 million large objects. It took 2 hours, give or take. The server it's on isn't especially fast though. It seems that each "SELECT pg_catalog.lo_create('xxxxx');" is run independently and sequentially, despite having --jobs=8 specified. Is there any magic incantation, or animal sacrifice, I can make to get those lo_create() calls run in parallel? Our 9.3 production servers have 12 cores (plus HT) and SSDs, so can do many queries at the same time. Thanks -- Mike Williams -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin