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 1tLi0g-00GUBV-Rh for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Dec 2024 12:09:39 +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 1tLi0c-00AdDb-S6 for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Dec 2024 12:09:36 +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 1tLi0c-00AdDS-69 for pgsql-hackers@lists.postgresql.org; Thu, 12 Dec 2024 12:09:35 +0000 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tLi0a-002RNA-Hh for pgsql-hackers@lists.postgresql.org; Thu, 12 Dec 2024 12:09:34 +0000 Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfout.stl.internal (Postfix) with ESMTP id C38F81140215; Thu, 12 Dec 2024 07:09:30 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Thu, 12 Dec 2024 07:09:31 -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=fm1; t=1734005370; x=1734091770; bh=v eijnrzmTBGqzPW9CNNlT2dvODwXnFh0wiIeelxeFD0=; b=prHC3+eElNl7a8SN1 szMDuTVxLL3qMrU8X/61x8D3oiXwHzmcAW3Hp9IG1AmO3CvRdzjYUYTIzPbQKDGo FTq8ULQuVgsQ80mwNgTKEZxSQMXcTBB9j5q5yLYW4jRHhdS9bvRR1C4zf3cWdukt QKqhifRfCayrAoDpvuay78VhrTFhKOOW9T+KCtOtlNAMNchB9MrLEPHW+Z+sV8ET E6oJDTJ576xpQ7Krh9JVXwqzBXnkQwF90msImH4t2kgZ8OEKcREGuUsz+Nl1i8V0 W6bFMLmm2bhyUF2n4hoC6n+dkaSfStjvH5q6UtzBRRFGXWXqUNWVOzhWGB7pE5p4 VT8gA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeehgdefhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecu hfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrd hnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfej jefhgfeiueeukeejkeffgfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprh hishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspghrtg hpthhtohepuddupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeelvghrthhhrghl ihhonheisehgmhgrihhlrdgtohhmpdhrtghpthhtoheprghshhhuthhoshhhrdgsrghprg htrdhoshhssehgmhgrihhlrdgtohhmpdhrtghpthhtohepughgrhhofihlvgihmhhlsehg mhgrihhlrdgtohhmpdhrtghpthhtohepjhhirghnrdhunhhivhgvrhhsrghlihhthiesgh hmrghilhdrtghomhdprhgtphhtthhopeifrghtrghrihdrhihuhigrsehgmhgrihhlrdgt ohhmpdhrtghpthhtohepiihmlhhpohhsthhgrhgvshesghhmrghilhdrtghomhdprhgtph htthhopehthhhomheslhhinhhugidrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggt khgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopegrrd hlvghpihhkhhhovhesphhoshhtghhrvghsphhrohdrrhhu X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 Dec 2024 07:09:29 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1734005366; bh=62bhnx2/nGU4JKv1RcA682xTbWl8QEjZ30ZjzRHCarg=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=LbDRYTLMqWnPbZcPAIDbV0vn0J836sBP8sBYom9n/nVX/yHtOgqrtySMeZlemmddc 1yivAj3M7Dycvd4heGngWcYJqFdBCf3VdJmGo8fIxeqXdpaDKEwom5vhpwzQQ3vsIi iiDWNN0reILCN0RFgoM4/aeT+LJxaoZ8BVQAHJcNjsqiiy0SbOl2dxLfwsRVDlDOkP M2WNzT/J5fd+TQj99vrTXCqYF+e4WO1W0Gccd7EdGyqi/HOS9uFA8sj1Z4s76l5FVa ACReHiEAZ36+fmgrRe8PVPszl/QX9IQbkBJ5YqW/+pkwFWJPKddQoCRMH2TDgNwAsX 5s5UCNV374BMQ== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id C21C99E; Thu, 12 Dec 2024 13:09:26 +0100 (CET) Date: Thu, 12 Dec 2024 13:09:26 +0100 From: Alvaro Herrera To: Yuya Watari Cc: Ashutosh Bapat , Dmitry Dolgov <9erthalion6@gmail.com>, PostgreSQL Developers , jian he , Alena Rybakina , Andrei Lepikhov , David Rowley , Thom Brown , Zhang Mingli , Tom Lane Subject: Re: [PoC] Reducing planning time when tables have many partitions Message-ID: <202412121209.4xewo2lfsuld@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 Hello Yuya, On 2024-Dec-11, Yuya Watari wrote: > On Tue, Dec 3, 2024 at 7:38 PM Alvaro Herrera wrote: > > > > I don't think planning time in assert-enabled builds is something we > > should worry about, at all. Planning time in production builds is the > > important one. > > Thank you for your reply. Making debug builds too slow is not good for > developers, I'm repeating myself, but I disagree that this is something we should spend _any_ time on. Developers running assertion-enabled builds do not care if a complicated query with one thousand partitions is planned in 500 ms instead of 300 ms. Heck, I bet nobody cares if it took 2000 ms either, because, you know what? The developers don't have a thousand partitions to begin with; if they do, it's precisely because they want to measure this kind of effect. This is not going to bother anyone ever, unless you stick a hundred of these queries in the regression tests. In regression tests you're going to have, say, 64 partitions at most, because having more than that doesn't test anything additional; having that go from 40 ms to 60 ms (or whatever) isn't going to bother anyone. If anything, you can add a note to remove the USE_ASSERTIONS blocks once we get past the beta process; by then any bugs will have been noticed and the asserts will be of less value. I would like to see this patch series get committed, and this concern about planning time in development builds under conditions that are unrealistic for testing is slowing the process down. (The process is slow enough. This patch has already missed two releases.) Please stop. Memory usage and planning time in production builds is important. You can better spend your energy there. Thanks -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "La gente vulgar sólo piensa en pasar el tiempo; el que tiene talento, en aprovecharlo"