Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sdQfM-00FRyS-V1 for pgsql-bugs@arkaria.postgresql.org; Mon, 12 Aug 2024 08:44:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sdQfK-00EDPP-6O for pgsql-bugs@arkaria.postgresql.org; Mon, 12 Aug 2024 08:44:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sdQfJ-00EDPG-II for pgsql-bugs@lists.postgresql.org; Mon, 12 Aug 2024 08:44:33 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sdQfI-004QWI-3v for pgsql-bugs@lists.postgresql.org; Mon, 12 Aug 2024 08:44:32 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 9E53C40002; Mon, 12 Aug 2024 08:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vondra.me; s=gm1; t=1723452270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QsYasxsjy0VB3bhB8er5silY7M3v8Hf8gv5j7r0YKGU=; b=j6vYOMMZBrRS7i1kjVngTIFpmUN3IL8QIXmYcnnSWVcpWNKo9k6YrWLMtPFL27toX4frmm NyIzRjRJOD685VRxL8HgI2LRiy+J1B1RixzIZ1SLbTwdCOUBZ+Xkaxw5WkkLELuna+VTYz jc3O7qb83/OK7ZY+5dEw/r7J5P21LnGSHUduAPlUZypw2s6gMkiNapQnrnwqs/zXeNAovd rWC/af6cwP52xWQRt/TnLztcj1tVRnCcXmQBr8dBmUk4N+xoIyJmV0bz1WxvO4WnqA/Ewt +ot5UFoYU/J4hsDG7VjJmgdrPqYiyR1NVyDidPxTd27gT+k/FVc4rqYOwUUczg== Message-ID: <65321f11-d8e1-4094-abbe-41b593a49801@vondra.me> Date: Mon, 12 Aug 2024 10:44:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: BUG #18569: Memory leak in Postgres Enterprise server To: "Sahu, Abhisek Kumar" , "Yeddula, Madhusudhan reddy [CONTINGENT WORKER]" , "Mathias, Renci" , Daniel Gustafsson , "pgsql-bugs@lists.postgresql.org" , "Sachan, Vishal" Cc: "Kumar, Gaurav" , "Nayak, Deepak Vaikunta" References: <18569-ba603937af37b1b6@postgresql.org> <4B5860EC-DBDB-464A-B744-C5091BF71659@yesql.se> Content-Language: en-US From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-GND-Sasl: tomas@vondra.me List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Abhisek, On 8/12/24 07:37, Sahu, Abhisek Kumar wrote: > Hi Daniel, > > Kindly let us know if you have any updates. > It's hard to say what happened, based on the information provided so far. It might be that there really is a bug / memory leak, or maybe the selected query plan is not great, or maybe there's a configuration issue. We'll need more information to find out. 1) What query was the failed backend running? Was it a big long-running query (e.g. in ETL/BI application), or many small OLTP queries? 2) Do you know what execution plan was used? 3) If you rerun the query, does the memory usage grow the same way? This would allow us to collect important data. For example, it would be very useful if you could attach a debugger to a backend consuming a lot of memory, and get memory context stats. 4) Can you share the configuration parameters? I think the memory config is the most interesting one (shared_buffers, work_mem, ...). How much RAM does the system have? 5) Is this a parallel query? In the snippet from /var/log/messages there are 3-5 postgres processes that look like they might be parallel workers (nearly sequential PIDs, same memory pattern). 6) Is this a long-running problem, or did it just start to happen recently? Perhaps after some change/upgrade? regards -- Tomas Vondra