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 1k0R0q-0002Bq-Ua for pgsql-general@arkaria.postgresql.org; Tue, 28 Jul 2020 14:55:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k0R0p-0006LU-UQ for pgsql-general@arkaria.postgresql.org; Tue, 28 Jul 2020 14:55:27 +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 1k0R0p-0006L4-NA for pgsql-general@lists.postgresql.org; Tue, 28 Jul 2020 14:55:27 +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 1k0R0n-00028u-Mk for pgsql-general@lists.postgresql.org; Tue, 28 Jul 2020 14:55:27 +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 06SEtLWm1193683; Tue, 28 Jul 2020 10:55:21 -0400 From: Tom Lane To: "Daniel Westermann (DWE)" cc: "pgsql-general@lists.postgresql.org" Subject: Re: Out of memory with "create extension postgis" In-reply-to: References: ,<1183741.1595944647@sss.pgh.pa.us> Comments: In-reply-to "Daniel Westermann (DWE)" message dated "Tue, 28 Jul 2020 14:47:08 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1193681.1595948121.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 28 Jul 2020 10:55:21 -0400 Message-ID: <1193682.1595948121@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Daniel Westermann (DWE)" writes: >> "Daniel Westermann (DWE)" writes: >>> The process eats all the available memory and finally dies: >>> # create extension postgis; >>> ERROR: out of memory >>> DETAIL: Failed on request of size 8265691 in memory context "PortalCo= ntext". >>> Time: 773569.877 ms (12:53.570) > There is nothing in the log file except these (not from today, but the m= essages are always the same): > 2020-07-03 16:52:16 CEST 53617 LOG: server process (PID 54070) was term= inated by signal 9: Killed A process that was killed by the OOM killer would not have managed to produce an "out of memory" ERROR report, so these two are different symptoms. You need to reproduce the first case, or you won't have any luck setting an error breakpoint either. If you can't manage to get back to that state, you might get somewhere by waiting for the process to grow large and then attaching with gdb and getting a stack trace. That's a bit less reliable than the errfinish approach, though. regards, tom lane