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 1mJFxO-0005cJ-Vd for pgsql-general@arkaria.postgresql.org; Thu, 26 Aug 2021 14:02:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mJFxN-0000Vc-TC for pgsql-general@arkaria.postgresql.org; Thu, 26 Aug 2021 14:02:13 +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 1mJFxN-0000VU-Kp for pgsql-general@lists.postgresql.org; Thu, 26 Aug 2021 14:02:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJFxL-0001fH-Cf for pgsql-general@lists.postgresql.org; Thu, 26 Aug 2021 14:02:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 17QE27xj648518; Thu, 26 Aug 2021 10:02:07 -0400 From: Tom Lane To: depesz@depesz.com cc: pgsql-general Subject: Re: Can we get rid of repeated queries from pg_dump? In-reply-to: <20210826084430.GA26282@depesz.com> References: <20210826084430.GA26282@depesz.com> Comments: In-reply-to hubert depesz lubaczewski message dated "Thu, 26 Aug 2021 10:44:30 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <648516.1629986527.1@sss.pgh.pa.us> Date: Thu, 26 Aug 2021 10:02:07 -0400 Message-ID: <648517.1629986527@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 ... regards, tom lane