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 1teaIC-00EQHd-VK for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Feb 2025 13:45:45 +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 1teaIB-007JS2-Ix for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Feb 2025 13:45:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1teaIB-007JRl-8s for pgsql-hackers@lists.postgresql.org; Sun, 02 Feb 2025 13:45:43 +0000 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1teaI7-002rbV-1E for pgsql-hackers@lists.postgresql.org; Sun, 02 Feb 2025 13:45:42 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id BFAF813805F6; Sun, 2 Feb 2025 08:45:38 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Sun, 02 Feb 2025 08:45:38 -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=1738503938; x=1738590338; bh=F MkmmR6xMb8GHh8N1ACdg+YFbjIJv9mBV5OpamaOjcQ=; b=O+owLCnyflWFK+BwM vqLBpaE6SkaMs86qxINdMU+SsQKomkob9pGC0FxOT0j5KSN+HiSwo6dgNTVMszOb pUYhl6mVwp8xo9hws5uppsur4WROToGaj59fiarnLQ+gPUkI5GHSzIaiDIm5hjbp 1Iv8p4oBnKhFB6wB71vCyo+RotBfjp5bk8eZvOzF222X0MN5kgfBnKUDPiFZylJR q1LUktYvdJNdC/aN+wmP1Xeo3KpmSEeLm4XMFk+dUQzo+7UAT8uAm6V1eEZj/f4C op4+7N/GmV25Ty5Vp2NE/R6dTuXoP5iwK7EWg4Z9YUtW+ds1o/0dLrloY88Zqn/u AVo7w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeekfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdej necuhfhrohhmpemllhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvh hhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpeehjeetgeejgfefleefkeej vddthfeiueeiffejvdejkeetfeeltdeuffejtdeiieenucffohhmrghinhepvghnthgvrh hprhhishgvuggsrdgtohhmpdhpohhsthhgrhdrvghsnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqd hiphdrohhrghdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtohepmhgvlhgrnhhivghplhgrghgvmhgrnhesghhmrghilhdrtghomhdprhgtphhtth hopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhr ghdprhgtphhtthhopehsrdhtrghtrghrihhnthhsvghvsehpohhsthhgrhgvshhprhhord hruh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 2 Feb 2025 08:45:37 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1738503935; bh=cFTq2UpSS4fpVm+RJ6sY8i/weW+fKpxq57wDvvYLvfo=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=PqIJy7j9jbyGPw9ccD3nICbqSQ03OpM6n9PbcJR17+GpkeWlx1ezRGexIDTZNUsw9 RqrZm8imhV84E1gG/kVRc8ZiKw3XDf32PZ1nCQDPzss0TxFCW6tdviWtGP98FPLwW3 KDxtbrJ/VmAmRK295KRReBaCRCTkddZI6mWyAD7i6ZNeoDNiPxyFimJSe2iCjU1yMH pamiphZcTj4QX/vcXznd8Ta2JcNeC0JFXAJcQIvEp8rks0G36e7GSD/XnWmnvs3Gsm 3IZSKiQ7DTN+quyfaPLOPfxMRyoVKtYWjAej1dBMqrrjiyfybreww29OApD5/s7wY+ 70JLc0ML8CbuA== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id B876B8F; Sun, 2 Feb 2025 14:45:35 +0100 (CET) Date: Sun, 2 Feb 2025 14:45:35 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Melanie Plageman Cc: Sergey Tatarintsev , "pgsql-hackers@lists.postgresql.org" Subject: Re: pgbench with partitioned tables Message-ID: <202502021345.roijlwskkwu6@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Jan-31, Melanie Plageman wrote: > Maybe instead of just not using COPY FREEZE on a table if it is > partitioned, we could add new data generation init_steps. Perhaps one > that is client-side data generation (g) but with no freezing? I'm not > really sure what the letter would be (f? making it f, g, and G?). I think it makes sense to do what you suggest, but on the other hand, the original code that Sergey is patching looks like a hack in the sense that it hardcodes which tables to use FREEZE with. There's no point to doing things that way actually, so accepting Sergey's patch to replace that with a relkind check feels sensible to me. I think the query should be SELECT relkind FROM pg_catalog.pg_class WHERE oid='%s'::pg_catalog.regclass if only for consistency with pgbench's other query on catalogs. Your proposal to add different init_steps might be reasonable, at least if we allowed partitionedness of tables to vary in other ways (eg. if we made pgbench_history partitioned), but I don't think it conflicts with Sergey's patch in spirit. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Here's a general engineering tip: if the non-fun part is too complex for you to figure out, that might indicate the fun part is too ambitious." (John Naylor) https://postgr.es/m/CAFBsxsG4OWHBbSDM%3DsSeXrQGOtkPiOEOuME4yD7Ce41NtaAD9g%40mail.gmail.com