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 1mJG3V-0005o8-TW for pgsql-general@arkaria.postgresql.org; Thu, 26 Aug 2021 14:08:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mJG3U-0003tX-RF for pgsql-general@arkaria.postgresql.org; Thu, 26 Aug 2021 14:08:32 +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 1mJG3U-0003tN-Hp for pgsql-general@lists.postgresql.org; Thu, 26 Aug 2021 14:08:32 +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 1mJG3S-0001ix-1C for pgsql-general@lists.postgresql.org; Thu, 26 Aug 2021 14:08:31 +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=1AO6gDpGgkqblw+8IQgJP80K9lDJpLhe2KgEQjq0YXg=; b=LvJ2b/gi9sjxCwM5aRp0xBb90a 6YlSaumkWXUAq13K4Bnt+Ga5DuBdI42bb+j1UZndBGp/WWu8luaZmbPuRtlux7NAzSws1ncl5bsue wVB9a8HYkadHuwAARx1HyOxs4poG73pcdy1BnU0utpD9MBabqJ5pjvyyEU5JkbnQg1dA=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1mJG3P-0004Pt-Ko; Thu, 26 Aug 2021 16:08:27 +0200 Date: Thu, 26 Aug 2021 16:08:27 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Tom Lane Cc: pgsql-general Subject: Re: Can we get rid of repeated queries from pg_dump? Message-ID: <20210826140827.GA15868@depesz.com> Reply-To: depesz@depesz.com References: <20210826084430.GA26282@depesz.com> <648517.1629986527@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <648517.1629986527@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 Thu, Aug 26, 2021 at 10:02:07AM -0400, Tom Lane wrote: > hubert depesz lubaczewski writes: > > It seems that for every function, pg_dump is getting it's data, and then > > runs format_type on each parameter/output type? I'm mostly guessing > > here, as I didn't read the code. > > Wouldn't it be possible to get all type formats at once, and cache them > > in pg_dump? Or at the very least reuse already received information? > Send a patch ... Yeah, that's not going to work, my C skills are next-to-none :( I guess I'll have to wait till someone else will assume it's a problem, someone with skills to do something about it. Best regards, depesz