Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D3BCD1337BD0 for ; Fri, 18 Feb 2011 13:35:25 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 90750-01 for ; Fri, 18 Feb 2011 17:35:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 88D1D133798E for ; Fri, 18 Feb 2011 13:35:17 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p1IHZDqW010033; Fri, 18 Feb 2011 12:35:13 -0500 (EST) To: Arnd Hannemann cc: pgsql-bugs@postgresql.org Subject: Re: postgresql 9.0.3: parallel restore fails with comments on indices In-reply-to: <4D5E3264.7060705@credativ.de> References: <4D5E3264.7060705@credativ.de> Comments: In-reply-to Arnd Hannemann message dated "Fri, 18 Feb 2011 09:48:36 +0100" Date: Fri, 18 Feb 2011 12:35:13 -0500 Message-ID: <10032.1298050513@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/163 X-Sequence-Number: 29435 Arnd Hannemann writes: > if pg_restore is used with -jN it fails if the dump has comments on indices. Reproduced here, thanks for the report! > The problem seems to be a false assumption in pg_backup_archiver.c: > ... > Comments are in SECTION_NONE so they get restored here regardless of dependencies, which is obviously wrong Yeah, that seems to need a bit more thought. It's intentional that comments that are in the PRE_DATA area get restored immediately, so as not to eat all the overhead of a worker subprocess for them. But we can't do it that way for comments intermixed with POST_DATA items. I think the simplest fix is to allow this loop to process SECTION_NONE items only as long as it hasn't skipped any prior items. regards, tom lane