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 1lKEX0-0003m7-Hg for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Mar 2021 06:10:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lKEWz-0001vc-Dn for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Mar 2021 06:10:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKEWz-0001vT-6w for pgsql-hackers@lists.postgresql.org; Thu, 11 Mar 2021 06:10:45 +0000 Received: from dish-sg.nttdocomo.co.jp ([202.19.227.74]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lKEWv-0005Na-IH for pgsql-hackers@lists.postgresql.org; Thu, 11 Mar 2021 06:10:44 +0000 X-dD-Source: Outbound Received: from zssg-mailmd101.ddreams.local (zssg-mailmd900.ddreams.local [10.160.172.63]) by zssg-mailou101.ddreams.local (Postfix) with ESMTP id 2D4541201C8; Thu, 11 Mar 2021 15:10:37 +0900 (JST) Received: from t113sg-mailcc12.ddreams.local (t113sg-mailcc12.ddreams.local [100.66.13.87]) by zssg-mailmd101.ddreams.local (dDREAMS) with ESMTP id <0QPS00UGTJTLZX90@dDREAMS>; Thu, 11 Mar 2021 15:10:33 +0900 (JST) Received: from t113sg-mailcc12 (localhost [127.0.0.1]) by t113sg-mailcc12.ddreams.local (unknown) with SMTP id 12B6AXkX022058; Thu, 11 Mar 2021 15:10:33 +0900 Received: from zssg-mailmf102.ddreams.local (unknown [127.0.0.1]) by zssg-mailmf102.ddreams.local (Postfix) with ESMTP id 929667E603A; Thu, 11 Mar 2021 15:10:11 +0900 (JST) Received: from zssg-mailmf102.ddreams.local (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9075B8E6062; Thu, 11 Mar 2021 15:10:11 +0900 (JST) Received: from localhost (unknown [127.0.0.1]) by IMSVA (Postfix) with SMTP id 8DCB08E6052; Thu, 11 Mar 2021 15:10:11 +0900 (JST) X-IMSS-HAND-OFF-DIRECTIVE: localhost:10026 Received: from zssg-mailmf102.ddreams.local (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 01F048E6058; Thu, 11 Mar 2021 15:10:11 +0900 (JST) Received: from zssg-mailua106.ddreams.local (unknown [10.160.172.62]) by zssg-mailmf102.ddreams.local (Postfix) with ESMTP; Thu, 11 Mar 2021 15:10:10 +0900 (JST) Received: from [10.132.127.204] (unknown [10.160.179.1]) by zssg-mailua106.ddreams.local (dDREAMS) with ESMTPA id <0QPS009IUJSS0Q10@dDREAMS>; Thu, 11 Mar 2021 15:10:04 +0900 (JST) Subject: Re: Huge memory consumption on partitioned table with FKs References: <20201203.142857.1823750032495295791.horikyota.ntt@gmail.com> <20201204.144822.1258776940142794322.horikyota.ntt@gmail.com> <1412267.1614891636@sss.pgh.pa.us> <2050317.1615333064@sss.pgh.pa.us> <2187988.1615404297@sss.pgh.pa.us> From: Tatsuro Yamada Message-id: Date: Thu, 11 Mar 2021 15:10:04 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-language: en-US Content-transfer-encoding: 7bit X-TM-AS-GCONF: 00 To: Amit Langote , Tom Lane Cc: Kyotaro Horiguchi , keisuke kuroda , Alvaro Herrera , PostgreSQL Hackers , tatsuhito.kasahara.rd@hco.ntt.co.jp X-CC-Mail-RelayStamp: CC/Mail Relayed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021/03/11 9:39, Amit Langote wrote: > On Thu, Mar 11, 2021 at 4:25 AM Tom Lane wrote: >> Amit Langote writes: >>> On Wed, Mar 10, 2021 at 8:37 AM Tom Lane wrote: >>>> Hmm. So, the key point is that the values coming from the partitioned >>>> child table are injected into the test query as parameters, not as >>>> column references, thus it doesn't matter *to the test query* what >>>> numbers the referencing columns have in that child. We just have to >>>> be sure we pass the right parameter values. >> >>> Right. >> >> I did some cosmetic fooling with this (mostly, rewriting the comments >> YA time) and pushed it. > > Perfect. Thanks for your time on this. Thanks for fixing the problem! :-D Regards, Tatsuro Yamada