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 1mJzKT-0000j3-5j for pgsql-general@arkaria.postgresql.org; Sat, 28 Aug 2021 14:29:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mJzKP-00036F-P9 for pgsql-general@arkaria.postgresql.org; Sat, 28 Aug 2021 14:29:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJzKP-000366-GA for pgsql-general@lists.postgresql.org; Sat, 28 Aug 2021 14:29:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJzKM-0000dj-U2 for pgsql-general@lists.postgresql.org; Sat, 28 Aug 2021 14:29:00 +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 17SESog51004391; Sat, 28 Aug 2021 10:28:51 -0400 From: Tom Lane To: depesz@depesz.com cc: Laurenz Albe , pgsql-general Subject: Re: Can we get rid of repeated queries from pg_dump? In-reply-to: <20210828064650.GB11579@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> <20210828064650.GB11579@depesz.com> Comments: In-reply-to hubert depesz lubaczewski message dated "Sat, 28 Aug 2021 08:46:50 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1004389.1630160930.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 28 Aug 2021 10:28:50 -0400 Message-ID: <1004390.1630160930@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk hubert depesz lubaczewski writes: > On Fri, Aug 27, 2021 at 05:23:23PM -0400, Tom Lane wrote: >> Those queries are coming from getFormattedTypeName(), which is used >> for function arguments and the like. I'm not quite sure why Hubert >> is seeing 5000 such calls in a database with only ~100 functions; >> surely they don't all have an average of 50 arguments? > 23 functions with 0 arguments, 52 with 1, and the max is 5 arguments - t= wo > functions have these. > Not sure if it matters but there is a lot of enums. 83 of them. And they= have > up to 250 elements (2 such types). Hmm, no, I don't see any getFormattedTypeName calls in dumpEnumType. There are two of 'em in dumpCast though. Does this DB by chance have a ton of user-defined casts? regards, tom lane