Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1terKh-00G46Q-4N for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Feb 2025 07:57:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1terKg-00BKli-7E for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Feb 2025 07:57:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1terKf-00BKla-RM for pgsql-hackers@lists.postgresql.org; Mon, 03 Feb 2025 07:57:25 +0000 Received: from fout-b5-smtp.messagingengine.com ([202.12.124.148]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1terKd-002udQ-2a for pgsql-hackers@lists.postgresql.org; Mon, 03 Feb 2025 07:57:24 +0000 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id A7719114010E; Mon, 3 Feb 2025 02:57:23 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Mon, 03 Feb 2025 02:57:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1738569443; x=1738655843; bh=V syiOqDxSamltEpzIHrIbwQaPb/zumqDPt7wUkyu4mU=; b=wvfi8MSi6JpqC7M9j laiSWUN82WYOtlShxQTkhkpnGmP0VfUHfp2X2LrdD+2y7zIuZbINmZCr3F5Ji4TY 9Jv+K4AFd0bxzzld1/mlUXdd7Y3vWqcTtPDTtVDPJ00mniOI6G6syoT4F71uzmL5 /Bcdhshe0Sp17gy3zOdF/MQ4uiDVLO6enhrJtAIxFGq5TW0QagnargStz9Lfar0o m+LIerpVTpSi1a2daOEa4zvbfhG+JUhRacZpdZ8Pg3NfcImDp4/GV5rtMQyb4zSj P0eXKemrW81fonX93gc4Chx4/aqn58nO1ozdhNXBTS7Ky6vgzhK+jP58MKS8ZZGP dEmtA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddujedtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdej necuhfhrohhmpemllhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvh hhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpedvheeuffehgfeukeeufeeh hefghfeugfefudekjeevudffgeffkeegffffveegheenucffohhmrghinhepvghnthgvrh hprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspg hrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepmhgvlhgrnhhi vghplhgrghgvmhgrnhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrg gtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehs rdhtrghtrghrihhnthhsvghvsehpohhsthhgrhgvshhprhhordhruh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 Feb 2025 02:57:22 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1738569441; bh=3r4sGqczVC+b6WRlUK4ogQE0BE8xEVhdvvVJ1lq7/08=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=nrt5SDyfWRZGIAdVxFf5aqfdOUK//peMxiZztia18sTag6quqs+/dXKFRZTV8P1TF UbTNZRsQKYGUzusDq1nf3tQ1JaK/vSlOy+ARxArrsLNgw0zjjwrCr7CL9EMNKpcl/1 jCUQDk4/2NKkgAeNslMuvuRuduaAmrmzctIufVxE0Kv5//GdPB2CiSWaCSv7vurqY7 jNp19qG+Nrx+1r0AjTQ6w6P2AusMndsQV9ZQyOZu+bkRDfZg+a/M/b9i4O4wbzHbaL jsD+DiE6+B8XddGKZHMbYgWEwbAW0K1rmDyhiQGvD3xKTbTK3cifx8kLz2su+UeLan UU+RwVHoh9qYw== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id EADD78F; Mon, 3 Feb 2025 08:57:21 +0100 (CET) Date: Mon, 3 Feb 2025 08:57:21 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Sergey Tatarintsev Cc: Melanie Plageman , "pgsql-hackers@lists.postgresql.org" Subject: Re: pgbench with partitioned tables Message-ID: <202502030757.muvzlswbtfuh@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2d4bd03d-1767-4471-9488-623f7fb7a981@postgrespro.ru> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Feb-03, Sergey Tatarintsev wrote: > Thanks for the note. I changed the query in the patch (v2 patch attached) > > Btw, an additional benefit from the patch is that we can use foreign tables > (for example, to test postgres_fdw optimizations) Good thought, and maybe it would be better if the new function was "get_table_relkind" which just returns the char, and this check > + /* Use COPY with FREEZE on v14 and later for all regular tables */ > + if ((PQserverVersion(con) >= 140000) && is_regular_table(con, table)) > copy_statement_fmt = "copy %s from stdin with (freeze on)"; can be "&& get_table_relkind(con, table) == RELKIND_RELATION" which I think is more natural. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/