Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xd4Vc-0007n1-N7 for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Oct 2014 21:47:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xd4Vb-0003js-Qk for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Oct 2014 21:47:27 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xd4VW-0003Zh-NV for pgsql-bugs@postgresql.org; Sat, 11 Oct 2014 21:47:22 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xd4VS-0005gJ-It for pgsql-bugs@postgresql.org; Sat, 11 Oct 2014 21:47:20 +0000 Received: from anarazel.de (p5DDC4026.dip0.t-ipconnect.de [93.220.64.38]) by mrelayeu.kundenserver.de (node=mreue101) with ESMTP (Nemesis) id 0LyDzx-1YHP304C7p-015Y1z; Sat, 11 Oct 2014 23:47:16 +0200 Received: by anarazel.de (Postfix, from userid 1000) id 3E4F6100303; Sat, 11 Oct 2014 23:47:15 +0200 (CEST) Date: Sat, 11 Oct 2014 23:47:14 +0200 From: Andres Freund To: Bruce Momjian Cc: joe@tanga.com, pgsql-bugs@postgresql.org Subject: Re: BUG #11033: 'pg_dump -a' much slower than 'pg_dump' Message-ID: <20141011214714.GH18020@awork2.anarazel.de> References: <20140725001052.16600.86470@wrigleys.postgresql.org> <20141011212659.GK21267@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141011212659.GK21267@momjian.us> X-Provags-ID: V02:K0:34N18rHgbuH3OEarEI/HNgk3KjqQ7+A1VEDT2rmI3NP hgjakOr65LO7XapPeyBO2V/78qfqpaUYQW2xwQfRwz8pgfyAK1 C/WDt+t7N9CAGM5K7lxK5CFVg4eiUsuyx7QSVMUqnL98itFJ7S WvBiM58MHlEzyfuAJpsg/D/7zVs7DIfdxI5tdBsyefY3qWxnkh VRMbOJJhXuumDl1laRsqt8C3cCQMOy+Jx073vZrrJUN49xDvf5 DQvSbZ4LFus0Z9mK5rI7I0Ni1SCeIgRfPE96HckLGksU2urO3r 7juFsLnKgz1FU7shtiR+N+21/jmURFu7Eus7sSa164L89IKRMn S85rnK5OR/BKV9lmgrcuwu+ZD8HZHCixwC2mmS2pW X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2014-10-11 17:26:59 -0400, Bruce Momjian wrote: > On Fri, Jul 25, 2014 at 12:10:52AM +0000, joe@tanga.com wrote: > > The following bug has been logged on the website: > > > > Bug reference: 11033 > > Logged by: Joe Van Dyk > > Email address: joe@tanga.com > > PostgreSQL version: 9.3.5 > > Operating system: Ubuntu 12.04 > > Description: > > > > I've got a small database that takes about 0.8 seconds to dump with > > 'pg_dump' and about 11 seconds to dump with 'pg_dump -a'. > > > > I've narrowed it down to the foreign key constraints in the database, if > > those are removed, then 'pg_dump -a' becomes fast again. > > > > I can't come up with an artificial test case. I can reproduce it using our > > company's db schema. I don't want to publicly post that schema to the > > mailing list, but I'd be happy to send the schema that shows the problem to > > someone privately. > > > > I can reproduce the problem in 9.3.4 and 9.4.beta1. > > Wow, that is certainly odd. There've been a couple cases of that where the dependency resolution gets more complex for data only dumps because of the added dependencies that try to get the order right to not violate foreign keys. IIRC Tom fixed a couple performance problems recently. Yep, 51fc6133488a80a1310972b8a0ad20aca13f5b02. Joe, can you check with some more recent version? Unfortunately that fix got committed after 9.3.5. 9.4 beta3 should be fine. Andres -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs