Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecDkx-0004Gz-RM for pgsql-admin@arkaria.postgresql.org; Thu, 18 Jan 2018 17:13:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecDkx-0001Ra-94 for pgsql-admin@arkaria.postgresql.org; Thu, 18 Jan 2018 17:13:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ecDkx-0001RR-24 for pgsql-admin@lists.postgresql.org; Thu, 18 Jan 2018 17:13:39 +0000 Received: from mail-io0-x234.google.com ([2607:f8b0:4001:c06::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ecDkt-0001No-Q4 for pgsql-admin@lists.postgresql.org; Thu, 18 Jan 2018 17:13:38 +0000 Received: by mail-io0-x234.google.com with SMTP id l17so15706784ioc.3 for ; Thu, 18 Jan 2018 09:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=hrgsmbKSHWDjmnF9obndrEoJLXzThnzcDBujsA46Yhs=; b=KbDa8yLU92HN2Ue4Dn8DITV//w3xmn/WL0t8a6yhfZ6DvgNDISuGhWMdSR/V3uFEOD 6OVH0bPJKMQUFrf5VUj9GFCxCPNRfkf0zdiFAH+pdxZYIdy8YZCrfKwkeOSBET0sYxGF UzQjvUT9KltkC6JEQ+isPXc4sjSwZtCZNWrfveziE77TuhPqw9Vvw9lsGdsToktDdcWj cldBX/k6pFD5A1FI0oR0r3/cbAUQTJdtQ+YpnYxK3X/5ujoi4LVIG01FmadJfr01ujZG 1mH2lY5wYa1qLA4yChneFWpjuCip5KR8NZEad7mOtst+/5fv1KavCMR7egMgDAHmoPbd reWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hrgsmbKSHWDjmnF9obndrEoJLXzThnzcDBujsA46Yhs=; b=hFDUxiZjntQI3VkEnzqJT/+2NZAkKcRJN3IhP0igP43powfwcUevW76BtffJdq7+Y9 nnPvn/zSwVOqkXrcQ1ZxVlOsVIiXV9tXs/rW3TrM/AMmDhkKundQauvm8JAIkJ2kjZ+Q C2NNPWIj8B6XELZMi7xefTt32XhuBCRfOKPOGidl06qeAA9+l241twLfsecdA76qqKDs wskD4SiB3PSFo4g4QKX0+fGpzwUwnHsDZ2HyakBrzD19qOkquGb3Lz2VFaBD3aa8Bu8x rRsuUokYkGOLRsHI53V+6g6cE2TssOAeAUHwxcatNdDnRa6CcM+A6Km3AAxMvX58Rxgo 9q+Q== X-Gm-Message-State: AKwxytdO4d0Odz4d7K3zSLMWCslwlLBAmG+K2+J89CLm4Hr/4S9R2yXF ogdex5W4J8Hf17YQk99jQJnit0w= X-Google-Smtp-Source: ACJfBousiPNx0SvdR4cHAB0ol4FfkiFQi5zJ12oohLo3cKgljJeV7EpRCxjUfGtQOkSJKjk96CkD8Q== X-Received: by 10.107.27.138 with SMTP id b132mr2226562iob.205.1516295613364; Thu, 18 Jan 2018 09:13:33 -0800 (PST) Received: from [10.128.4.73] ([216.191.119.186]) by smtp.gmail.com with ESMTPSA id c8sm3935988itg.15.2018.01.18.09.13.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jan 2018 09:13:32 -0800 (PST) Subject: Re: Abnormally high memory usage/OOM triggered To: pgsql-admin@lists.postgresql.org References: <4d52fee7-73ba-16a9-9c27-8ae5107ee6ae@gmail.com> <5E0AB8DB-F13B-41BF-843A-FE64FBE9C097@elevated-dev.com> From: Davlet Panech Message-ID: <15a90b55-5151-ce22-16ee-7ff883e5eb97@gmail.com> Date: Thu, 18 Jan 2018 12:13:33 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <5E0AB8DB-F13B-41BF-843A-FE64FBE9C097@elevated-dev.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/17/2018 5:57 PM, scott ribe wrote: > On Jan 17, 2018, at 2:57 PM, Davlet Panech wrote: >> >> Does my configuration look reasonable? I just don't understand how it could possibly use up 19 GB of memory based on the configuration below. Is there a memory leak in there somewhere? > > It does seem awfully high, but... An update can involve a join across multiple tables. Or an update can run a trigger which can cascade. Either of those could result in an "accidental cross product" join, which can always blow up memory. There must be a way to put an upper limit on memory even for such cases. I was under the impression that parameters such as "work_mem" serve that purpose, is that not the case? So an "accidental cross product" join's memory usage is unbounded? It can't be... could somebody confirm this please? Thanks, D.