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 1uixlR-000vhg-3b for pgsql-admin@arkaria.postgresql.org; Mon, 04 Aug 2025 16:10:17 +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 1uixlO-002e7s-Tl for pgsql-admin@arkaria.postgresql.org; Mon, 04 Aug 2025 16:10:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uixlO-002e7d-Ih for pgsql-admin@lists.postgresql.org; Mon, 04 Aug 2025 16:10:14 +0000 Received: from mail-oa1-x35.google.com ([2001:4860:4864:20::35]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uixlK-000iD4-1S for pgsql-admin@lists.postgresql.org; Mon, 04 Aug 2025 16:10:13 +0000 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-307345663b3so491015fac.3 for ; Mon, 04 Aug 2025 09:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754323810; x=1754928610; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=8vgZLeWj3YwR8Gq8IfbqE1XJCXixae9fhK8Y/AYuv98=; b=BAsI40NDZX4MeiNXuXzUFyXXhpV9UQlFeRO9luWtcFuQxqZ5zHR4ytOXg1UpH0kftO pNKTuSwkh3St4Tqpn+CcBh2lUyk57gmVvmp2jqDVJ4CqD77N0aJvl7k2XQ4+fbdfGG/+ XtEm2hqzvWdUAAdDGxZqzqRDiyzJlVnE3ZMIaDyjEr4B+E+QDfNn7WT9W4TC3Zv76x2A LrEmZayeC+2vIMcNr9OMudmU1aCTJy2+jlkTdCt9D85WpZ/bXs64/EmzgfDBNIeAHoBc A+OamgAMCF97q7lVA4q7m0HnmVMLCAnLXNaoTvTaKwfDA/EVx8SCKUCX1qADWYPaOokM g1rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754323810; x=1754928610; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=8vgZLeWj3YwR8Gq8IfbqE1XJCXixae9fhK8Y/AYuv98=; b=SvzL7YfaHgDcxwcJBo2P7UlhWUuLuHp3eI0CPeRbQfAAqxqbjrpYqRtPd4lwCzyPZ5 evm7kYozMoNY4dFbuGVORM0HbVpvFi4p+QcQGbcfpOk09iENOH/0CzuZfPVrtZjmzGdW L/BjiHuyBl7UWxs4IUjyIYKU/AuThu/2VRgqTQhvn/leAtpGM2JmQR5fl2FAcurnGTET RNsDN0fMcgHXO1jRxd5eYqVQ+CEK5qa4Osh7bM4q0JHmuABWGAL4kwIKgpThPp2OjRNV 7Q2VPW3qezBiNOvfqt3rxZI/SGNDCZBFQ96QDmB9MAVckd8STQs9bQwCw7cNtALpdwKI hMmg== X-Gm-Message-State: AOJu0YzHwbe9N3jyldypSNdbSRqVHQvZhX6Eo+7eXW5dXuZtgYsIOU2W z4bOC+2e/qnnK+mN/8AiavWX0F/kMl6NCv4P5q4SN4caS8nt7b8tyJxswdRa8JkAo2P9+WCj0iM 3U76P+5oD3PZIE41QcDk8Z9M8u3fgFfH17w== X-Gm-Gg: ASbGncuA1srhosrqMtCQce+Z04JMkyerMuxNEGgHKYoIMztFb+qBoDe/LeDUal13htU R9SgEBwujgOWAkYiRWcGcz3jtnQzEYPfE0N8HexnwSeoj3Tg2GIcP9EaDNAIHvYFs1/ObFnu7Oz RUZP8PYOr44BAs/6ljXGoKQOrUulxNxIwNFNiQOH3fkU4OXLlNypBN0BFxFw4A1k9xU+MEdSuXZ rwJi/pmBP93qfnZFMt/9GnMCZCuJCVc2WdTRP/Rfg== X-Google-Smtp-Source: AGHT+IFVvbfQMRKII0djln/hVqVdJNh7EnsQ/lKK8TrxnHxCFiXnssLuBxYD/Wf1h+vGqdIxzOmya3mKCvohwnRQ0vc= X-Received: by 2002:a05:6808:1c0d:b0:41e:7a9e:a06c with SMTP id 5614622812f47-433f0373b0dmr2644908b6e.7.1754323810081; Mon, 04 Aug 2025 09:10:10 -0700 (PDT) MIME-Version: 1.0 From: Ramakrishna Reddy Nandyala Date: Mon, 4 Aug 2025 21:39:58 +0530 X-Gm-Features: Ac12FXx_Fl6xQ7gl5ZRcENOylniM88e5EikDkWSivoU7a6zU0iKN38WR3DIFB84 Message-ID: Subject: Clearing of temp files is very slow in pg16 To: pgsql-admin@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000856432063b8c571e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000856432063b8c571e Content-Type: text/plain; charset="UTF-8" Hi Team System details We are using pg-16.8 on rhel 9.x RAM-96GB CPU-16 We have configured 25% RAM as shared buffers,50% as effective cache.we have configured 50% RAM for Huge page settings Max connection set to 2000 Work-mem -4 mb Maintenance work mem set to 1 GB Issue details 1) we have an application that selects the data and will process in application and try to insert the data into an other table During this process we are seeing so many temporary files been generated by the system,after some time we are seeing the application Connection is accumulating the memory at OS Level after reaching ~50%,we are getting Out Of Memory error and Kernel is killing the top memory consumer process ,here it is killing Postgres process that is doing the entire process.while automatic Postgres Service restart ,system status showing as activating and it is coming to Active state only after clearing of all the temporary files crated during the query running.The clearing of temp files are very slow such that it is causing unplanned outages to the system how to fasten the Temp files removal? How to get rid of this situation? Any suggestions on the configuration to avoid the temp file generation Thanks in advance Ramakrishna --000000000000856432063b8c571e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Team=C2=A0

System details

We are using pg-16.8 on r= hel 9.x
RAM-96GB
CPU-16
=

We have configured 25% RAM as= shared buffers,50% as effective cache.we have configured 50% RAM for Huge = page settings=C2=A0

Max = connection set to 2000
Work-mem -4 mb
Maintenance work mem set to 1 GB
=C2= =A0
Issue details=C2=A0
1) we= have an application that selects the data and will process in application = and try to insert the data into an other table

<= /div>
During this process we are seeing so many temporary = files been generated by the system,after some time we are seeing the applic= ation Connection is accumulating the memory at OS Level after reaching ~50%= ,we are getting Out Of Memory error and Kernel is killing the top memory co= nsumer process ,here it is killing Postgres process that is doing the entir= e process.while automatic Postgres Service restart ,system status showing a= s activating and it is coming to Active state only after clearing of all th= e temporary files crated during the query running.The clearing of temp file= s are very slow such that it is causing unplanned outages to the system
=C2=A0
how to fasten the Temp fi= les removal?
How to get rid of this situation?
=
Any suggestions on the configuration to avoid the temp fi= le generation=C2=A0

Than= ks in advance=C2=A0
Ramakrishna=C2=A0


--000000000000856432063b8c571e--