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 1lKOhZ-0002dX-JQ for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Mar 2021 17:02:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lKOhW-0003Fv-28 for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Mar 2021 17:02:18 +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 1lKOhV-0003Fo-RF for pgsql-hackers@lists.postgresql.org; Thu, 11 Mar 2021 17:02:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKOhP-0002Fx-2n for pgsql-hackers@lists.postgresql.org; Thu, 11 Mar 2021 17:02:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 12BH1usd2305129; Thu, 11 Mar 2021 12:01:56 -0500 From: Tom Lane To: Tatsuro Yamada cc: Amit Langote , Kyotaro Horiguchi , keisuke kuroda , Alvaro Herrera , PostgreSQL Hackers , tatsuhito.kasahara.rd@hco.ntt.co.jp Subject: Re: Huge memory consumption on partitioned table with FKs In-reply-to: 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> Comments: In-reply-to Tatsuro Yamada message dated "Thu, 11 Mar 2021 15:10:04 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2305127.1615482116.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 11 Mar 2021 12:01:56 -0500 Message-ID: <2305128.1615482116@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tatsuro Yamada writes: > Thanks for fixing the problem! :-D Hmm, I'm not sure we're done with this patch: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dhusky&dt=3D2021-= 03-10%2021%3A09%3A32 The critical log extract is 2021-03-11 05:10:13.012 CET [21574:1082] pg_regress/foreign_key LOG: stat= ement: insert into fk_notpartitioned_pk (a, b) select 2048, x from generate_series(1,10) x; 2021-03-11 05:10:13.104 CET [11830:368] LOG: server process (PID 21574) w= as terminated by signal 11: Segmentation fault 2021-03-11 05:10:13.104 CET [11830:369] DETAIL: Failed process was runnin= g: insert into fk_notpartitioned_pk (a, b) select 2048, x from generate_series(1,10) x; Now, maybe it's a coincidence that husky failed on a partitioned-foreign-key test right after this patch went in, but I bet not. Since husky runs CLOBBER_CACHE_ALWAYS, it looks to me like we've overlooked some cache-reset scenario or other. regards, tom lane