Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKbyQ-0007S1-Em for pgsql-general@arkaria.postgresql.org; Mon, 30 Aug 2021 07:44:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mKbyP-0005m5-1W for pgsql-general@arkaria.postgresql.org; Mon, 30 Aug 2021 07:44:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKbyO-0005lx-O3 for pgsql-general@lists.postgresql.org; Mon, 30 Aug 2021 07:44:52 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKbyJ-0005Wa-AT for pgsql-general@lists.postgresql.org; Mon, 30 Aug 2021 07:44:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Dw2seI1cg7G90vUKiXhQorpoW0JqQ6sfaHPiibWQ3KA=; b=fpDYFhrvBL/4QYQxmnAyhZ+3j4 A/rkSis9qXk2dKScOHVHsm+P/2Ub08g0l9gmTaF/7kg9N0qAvaA0er7Ju2kdpaBa5jHqDio3yjS+M BqDkPkOkECycH9KK7HRq8VE7REC7XLXLnjvcEu+QOitDPXO3S366blhx33uwJV/piYi8=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1mKbyF-0006Kf-4v; Mon, 30 Aug 2021 09:44:43 +0200 Date: Mon, 30 Aug 2021 09:44:43 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Tom Lane Cc: Laurenz Albe , pgsql-general Subject: Re: Can we get rid of repeated queries from pg_dump? Message-ID: <20210830074442.GB15241@depesz.com> Reply-To: depesz@depesz.com References: <20210826084430.GA26282@depesz.com> <648517.1629986527@sss.pgh.pa.us> <20210826140827.GA15868@depesz.com> <649446.1629987629@sss.pgh.pa.us> <20210826160644.GA3120@depesz.com> <896732.1630099403@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <896732.1630099403@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Aug 27, 2021 at 05:23:23PM -0400, Tom Lane wrote: > I experimented with the attached, very quick-n-dirty patch to collect > format_type results during the initial scan of pg_type, instead. On the > regression database in HEAD, it reduces the number of queries pg_dump > issues from 3260 to 2905; but I'm having a hard time detecting any net > performance change. Hi, So, I applied it to brand new HEAD from git, Result: