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 1mKKcv-0007dN-6X for pgsql-general@arkaria.postgresql.org; Sun, 29 Aug 2021 13:13:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mKKct-0003yK-To for pgsql-general@arkaria.postgresql.org; Sun, 29 Aug 2021 13:13:31 +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 1mKKct-0003yC-5t for pgsql-general@lists.postgresql.org; Sun, 29 Aug 2021 13:13:31 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKKcl-0005ST-Qw for pgsql-general@lists.postgresql.org; Sun, 29 Aug 2021 13:13:29 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 1FAFA3200684; Sun, 29 Aug 2021 09:13:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 29 Aug 2021 09:13:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=OHgFfYyTII50L1E7jxcqDdTI8IlrR5s/oWMwrc18Q80=; b=Pl0IS3Qe MeSgdmfzqVu9NkFA+K3ZiJb/FsqUmcbKDnIqJgcWAnsMrgx2ePOyfJic2IkSXGwu YGCw2yf6OQn0VxHlGc7HeH26jNR708IKPWSVVLsCWJ8A8M8K0PdwVwfaJlR6vrZf m/mMWwyxIMYJGOx40qYBirytneL/YffRBOrSEYJfJi+EVYf8dEdHchzzE5eHWkEe 382CZrVHrJ6Lhn67k4KB5c4q5VcWXN+IYoEF2JDGKe1N+hW1uhL5meHRxxe3Uq7v gQKxFLpS0aeEPy5rcT742boqj2eNPLnUFmtD6QidD7JnossSqFDrZEczU8b/fqE4 OSFX3eCCZNITkQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddujedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedujeevjeffjeevuddutedvkeeiueeitddvieelfeekveej udefgeeuvdejhfeuleenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 29 Aug 2021 09:13:19 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 21EA42A05ED; Sun, 29 Aug 2021 09:13:15 -0400 (-04) Date: Sun, 29 Aug 2021 09:13:15 -0400 From: Alvaro Herrera To: Tom Lane Cc: depesz@depesz.com, Stephen Frost , Laurenz Albe , pgsql-general Subject: Re: Can we get rid of repeated queries from pg_dump? Message-ID: <202108291313.oufovwqmwm67@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1082810.1630189581@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Aug-28, Tom Lane wrote: > Here is a second patch, quite independent of the first one, that > gets rid of some other repetitive queries. Another pointlessly repetitive query is in getTriggers, which we run once per table to be dumped containing triggers. We could reduce that by running it in bulk for many relations at a time. I suppose it's normally not hurtful, but as we grow the number of partitions we allow it's going to become a problem. No patch from me for now — if someone wantw to volunteer one, it looks simple enough ... -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/