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 1pX59W-0005sf-4X for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Feb 2023 18:56:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pX59U-0001W3-Go for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Feb 2023 18:56:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pX59U-0001VW-6R for pgsql-hackers@lists.postgresql.org; Tue, 28 Feb 2023 18:56:40 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pX58m-0003af-2Z for pgsql-hackers@lists.postgresql.org; Tue, 28 Feb 2023 18:56:01 +0000 Received: by mail-wm1-x32e.google.com with SMTP id p26so7103752wmc.4 for ; Tue, 28 Feb 2023 10:55:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=bcbh+5Rn1PbUKkseW8EUWb+Dskb2snh41cwUHqQCzq8=; b=XJboeHRCxY8mt5S6aXrhh1m7iFkqYqiBrXAqH9cpYsImVJYO0D+oUf7uMaXtO5H4WJ gSVJa8q5Muw7GoW/m5ZgaNRXDJWnxuTrPKsCXTs9UBPgu+d15iCtbOxEPVoISkcP7vbZ JKZA11jndCOzzQJNz7A4dzYV5ZWDSoA3LjYE/yChC0mCpG/dqhA5IUqYx5x04WAKYMyT SsjR7fzVZfMBd2TsPVjpwUQ7x56WdfbHGHHSeMz8xjNiUduyTJtRY9FYjxu+OIMKYrnk PruWmPYmzKoFwn+UXo6LlCkKEb2N5qdFzOetiNzre7jyEomjmqZHO27ptr9Q+qg8yw88 Vbvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bcbh+5Rn1PbUKkseW8EUWb+Dskb2snh41cwUHqQCzq8=; b=mRwJmljmTnCaRg1HabQcEJOHGSIXKStA272O1xgz/lHuVZ3xURbjpmOLEzybw7VsO5 ENlrHZ18SQcwMjGedxVCE++Fwhm2/qYQzxAUHDBPzNiYIcCz4vaV9cIElmqarYPGvnyx exnijeSSgOrPbt8adn5zKoSl4+c7uXRf6j0QXgRozm5c6guj3p34JRp0egoEIvd6Y24O 5jj9x+bR0WZ/JqoSdqg9we+de86Z3/48jL4mPK1AlLIzUvZlNXCeb8p+WvDPLyu6ObZ3 KhylROznqqlVkDLIVcdBxVJJX8B+OtLENH8piM1PA875XeG5O2Ab9z/zhk+6k3OvqQqQ cYrw== X-Gm-Message-State: AO0yUKUvDpeHUMVqtWPnovaCjQB3rVyQm8DsmujKwLTEKgUBTbIsjCku u3atjlcj7EZGnpJ4RoQps3cZtelVOsT/kHaLHBsY+gsrVyKMrbpR//nsrw/M4/5KGEJn6JH2WR+ X1WjSBvQhei/FWAur40Nwd+dLaFRU4E7CqLHPqpqIEZXqPJiVmejAEgfvc4vWCMk8nXi+k6BmP+ 04v6it9wZlkSOOq8If0wgi+gFrjYsJy1QyZL3rzbQetlEV5vyWOlYG X-Google-Smtp-Source: AK7set9+fTZzkNtGyIwAdIGcpdxPE7FXV8OuP+lmKDdKSopamqW9YC1+taF4Z/7DQOaUygcniKsi/g== X-Received: by 2002:a05:600c:44ca:b0:3db:2e06:4091 with SMTP id f10-20020a05600c44ca00b003db2e064091mr3290475wmo.37.1677610554379; Tue, 28 Feb 2023 10:55:54 -0800 (PST) Received: from [10.137.0.17] (ip-86-49-226-19.bb.vodafone.cz. [86.49.226.19]) by smtp.gmail.com with ESMTPSA id p15-20020a05600c1d8f00b003e20970175dsm17488016wms.32.2023.02.28.10.55.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Feb 2023 10:55:54 -0800 (PST) Message-ID: <40ea5c5d-2420-d85f-eb5b-23322df61c8d@enterprisedb.com> Date: Tue, 28 Feb 2023 19:55:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: Memory leak from ExecutorState context? Content-Language: en-US To: Justin Pryzby , Jehan-Guillaume de Rorthais Cc: pgsql-hackers@lists.postgresql.org References: <20230228190643.1e368315@karst> <20230228182508.GA30529@telsasoft.com> From: Tomas Vondra In-Reply-To: <20230228182508.GA30529@telsasoft.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/28/23 19:25, Justin Pryzby wrote: > On Tue, Feb 28, 2023 at 07:06:43PM +0100, Jehan-Guillaume de Rorthais wrote: >> Hello all, >> >> A customer is facing out of memory query which looks similar to this situation: >> >> https://www.postgresql.org/message-id/flat/12064.1555298699%40sss.pgh.pa.us#eb519865575bbc549007878a5fb7219b >> >> This PostgreSQL version is 11.18. Some settings: > > hash joins could exceed work_mem until v13: > > |Allow hash aggregation to use disk storage for large aggregation result > |sets (Jeff Davis) > | That's hash aggregate, not hash join. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company