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 1sRvaH-0027YR-Fq for pgsql-general@arkaria.postgresql.org; Thu, 11 Jul 2024 15:19:49 +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 1sRvaG-00FH7g-7U for pgsql-general@arkaria.postgresql.org; Thu, 11 Jul 2024 15:19:48 +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 1sRvaF-00FH5m-Nn for pgsql-general@lists.postgresql.org; Thu, 11 Jul 2024 15:19:47 +0000 Received: from mout.gmx.net ([212.227.15.15]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sRvaD-001Zs5-K6 for pgsql-general@lists.postgresql.org; Thu, 11 Jul 2024 15:19:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1720711183; x=1721315983; i=jimis@gmx.net; bh=JEvJralDuVKk7Ha6fJtVCl8EAvcDsPC7CcnDqURsp3Q=; h=X-UI-Sender-Class:Date:From:To:cc:Subject:In-Reply-To:Message-ID: References:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=GMsCZvVFYvunmr8fQVEw2fY/nal7LQWaozOExN/Qhik21MLDYu15ojd6la2eRXTd 0rb3QkIl7slaBees0ZldWVFVENemb0CPX0MbXupKIr81dpeLgDDln8vps7K4Rzoiw By/DSazjgzO5CEe+3S6frN9NJrAQzPnXoSnwBV9X0yDguhor9nIpsPyzNZyUL0tsH eHknNACushRGRer7m1VdxRbt0RediD0FcfgXqheCoeG2IwbMgoCYuT3Hbg2ebMuqw cDbPULGR1yE6mHBFh71+9qJdcU4K0b+E/5oRUMBruuEtP1ZWByB5k1fXey8JShRGp lg525exxnipe5ArwMw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [10.9.70.81] ([185.55.106.54]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M1psI-1sPiel2ahU-006QEt; Thu, 11 Jul 2024 17:19:43 +0200 Date: Thu, 11 Jul 2024 17:19:42 +0200 (CEST) From: Dimitrios Apostolou To: Tom Lane cc: David Rowley , pgsql-general@lists.postgresql.org Subject: Re: Query on partitioned table needs memory n_partitions * work_mem In-Reply-To: <2077940.1720709022@sss.pgh.pa.us> Message-ID: <82476a55-bb26-b566-e6d9-907592ce732e@gmx.net> References: <3603c380-d094-136e-e333-610914fb3e80@gmx.net> <2077940.1720709022@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Provags-ID: V03:K1:QYoUsZ8QAUfpdV1sC2fr6JR8DAQDVHiu62yfDmig6gPUOZhZrSJ bE/31f9u34iPk4ysGbvEbKw7fyRkGF0nBF+gtQcnYXL9Gz5heCfdTPp2jngtqm9U6fgnRaU tZ5lM3NKf6oLBVCGfUUDtndkk5YPLLSw+rNyKcoh3Px0OY3GYPmN1a18D3sRt+/gHjYM/vi WGbEdOTa6wBoPVywdmPQQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:mGAkaL2Tick=;tRuBqQlyai6PiWQsRMFSxTPCWkV 2b85rPfbg8bxlDtLPpXwRToe6W2Ht3HqhhThDZ3j+deuVbDu+N9G87m9CQCxBKsGIL0uRdh2p G8yd8jz2l6RQTkrSdjZxrnFzXVHAYk/iHmJqLT4s2U3othMkms9eM2AC6yruHPmVkR0PKfb2H Do9yb4YvBSnoeSs7RgQ0d4vNk/g1WnrB18xxwQmUd5sneqKsMp2KckFqA5mo1nDvPZDdKFNNy WY2q1wV9g2+YKqeu20KmvFzc8cNC/kIr1Xm2C39XfIcpfIK6ySy7XVqKrDSiF2VQtbCeQAqhc +Vx52PMBhZoLXCACw620WUa1d68Wj6HVUFNa21duF92qQIg7Snhfyv1X00CZgRMVfZPwEXFjc heY7PydVm1tTnxmwIsH87vzV2gfb75FD4dTCtkr2MP5f8JJI2zQGYiK2O1FNEhrKkeHjQAI3e gPU0VLArUUzaXx4890eoYO3fpbjhzaLg1xM04VFb9ffmc78Yig+zrtBFUd/nUMY+lrzDVYknC Uk+/54VLSlfe1l42VniGislG7PFzn6MAou5snRLG58/aBvbl2doL1vgmeR5qXdGuJr0HhsQ29 PhruhQ5AJ9hq5BcQfceJIca+fZg0yEmj9/QpAlcZGW1ouWzKy3RX3HjY5zgDRDjHXCFAaqUFG cJ6antDLYdQHirS+dOgtGRNz0Wyvl0HYXRf8X5QroQ50mn2ye35N9NptUrWhNM06W6BPDeS6m IZnjtD3EHP1J9qK7coO7DdLZWWi9YHiv+jvXbF26v9+4P/HLbpfYriBEDlTD/r4QSx26dAkuI M9apZdUgKHhUyHaHEbZZ0aIw== Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 11 Jul 2024, Tom Lane wrote: > Dimitrios Apostolou writes: >> The TABLE test_runs_raw has 1000 partitions on RANGE(workitem_n). > > So don't do that. Adding partitions is not cost-free. > I understand that, they also add an administrative cost that I'd rather avoid. But I ended up adding all these partitions because of performance issues on a multi-billion rows table. There is probably some message from me on this list a couple of years ago. At the moment I have a work-around. I'm thankful that everyone is willing to provide workarounds to all potential issues/bugs I have presented, but unfortunately workarounds are not fixes, one will hit the same wall again at some point. My current concern is **reporting my findings responsibly**. I want to provide as much data needed to pinpoint the issue, so that the developers know exactly what's going on. Having right data is half the fix. A way to track the issue would be nice. I might revisit it and even try to submit a patch. I wonder how the postgres development community is tracking all these issues, I've even started forgetting the ones I have found, and I'm sure I have previously reported (on this list) a couple of should-be-easy issues that would be ideal for beginners. Regards, Dimitris