Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id E7F4019BA3A5; Thu, 31 May 2012 01:18:30 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SZwqD-0005oP-VB; Thu, 31 May 2012 04:18:30 +0000 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 q4V4IHss026888; Thu, 31 May 2012 00:18:17 -0400 (EDT) To: Stephen Frost cc: Tatsuo Ishii , pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: pg_dump and thousands of schemas In-reply-to: <20120531040149.GC1267@tamriel.snowman.net> References: <20120529.185149.1127748531209576379.t-ishii@sraoss.co.jp> <12147.1338306742@sss.pgh.pa.us> <20120530.180620.600165924826262795.t-ishii@sraoss.co.jp> <20120531.092043.1953698679173443322.t-ishii@sraoss.co.jp> <26386.1338436470@sss.pgh.pa.us> <20120531040149.GC1267@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Thu, 31 May 2012 00:01:49 -0400" Date: Thu, 31 May 2012 00:18:17 -0400 Message-ID: <26886.1338437897@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201205/180 X-Sequence-Number: 47004 Stephen Frost writes: > The current situation where the client-to-server latency accounts for > multiple minutes of time is just ridiculous, however, so I feel we need > some form of this patch, even if the server side is magically made much > faster. The constant back-and-forth isn't cheap. No, you're missing my point. I don't believe that client-to-server latency, or any other O(N) cost, has anything to do with the problem here. The problem, as Jeff has demonstrated, is the O(N^2) costs associated with management of the local lock table. It is utterly pointless to worry about O(N) costs until that's fixed; and it's just wrong to claim that you've created a significant speedup by eliminating a constant factor when all you've done is staved off occurrences of the O(N^2) problem. Once we've gotten rid of the local lock table problem, we can re-measure and see what the true benefit of this patch is. I'm of the opinion that it will be in the noise compared to the overall runtime of pg_dump. I could be wrong, but you won't convince me of that with measurements taken while the local lock table problem is still there. regards, tom lane