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 1pfGxy-0002b3-AA for pgsql-admin@arkaria.postgresql.org; Thu, 23 Mar 2023 09:10:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pfGxw-0007d6-OK for pgsql-admin@arkaria.postgresql.org; Thu, 23 Mar 2023 09:10:36 +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 1pfGxw-0007cU-CD for pgsql-admin@lists.postgresql.org; Thu, 23 Mar 2023 09:10:36 +0000 Received: from sender4-zc7.zoho.com ([136.143.188.7] helo=sender4.zoho.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfGxt-0000ko-Dt for pgsql-admin@lists.postgresql.org; Thu, 23 Mar 2023 09:10:35 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1679562628; cv=none; d=zohomail.com; s=zohoarc; b=OA8/QWOcwnyhCrQncnaNQnz8kGzAPqzEg8YJ8CcUbDEydFLSiJE9ntf6A+YhT1NOmjQ0S8qfWyVk7N3qRAoxTyN8G42HhoGUu0KKkySPGqSn0W+Q9f/7cHrL1gM+nPa+gXcY114awXsiwEe1SkJSqWryHvJaQnQKAprHqZkOPXY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679562628; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=fstPyUvrXykZnVih7hCCv2xyKUyleoJU3flYWREs6HA=; b=mox/RbfoOYtFFWJfahkPLsNg4veF8vKHLzx8W4C8d+QfOM3DMB2mRbPjiYS1N+tPDEy59T1Dxkej3DzxH33SdhBZ8qxG9Kl923S+MnYeM/DGairGBG6PImBu61XrP5VXJ/zgRcI5W0/DutgYtoiW6OC7Fp5dyUIYmrKNunqJDak= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zohocorp.com; spf=pass smtp.mailfrom=karthikk@zohocorp.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1679562628; s=admin; d=zohocorp.com; i=karthikk@zohocorp.com; h=Date:Date:From:From:To:To:Message-Id:Message-Id:In-Reply-To:Subject:Subject:MIME-Version:Content-Type:Reply-To:Cc; bh=fstPyUvrXykZnVih7hCCv2xyKUyleoJU3flYWREs6HA=; b=LW/ae5crVnjdMZLVWz+EIfob6av5ljuSnjlwrqOfv/0dxSWiDLg2NyDQDiyN9je3 nfqi2dYqhPE/dSEp7vbjKZy+oJt23oZsbRh1NqIBqVWKIEll76d/+O/Nw9k1MJAt8Bw fmjlLgdNjan6T7wXNpQNuHkhD2s88tWAD/Qmke/M= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1679562621364672.1728341570046; Thu, 23 Mar 2023 02:10:21 -0700 (PDT) Date: Thu, 23 Mar 2023 14:40:21 +0530 From: Karthik Krishnakumar To: "pgsql-admin" Message-Id: <1870db7265d.f259eb2750325.860651782313663792@zohocorp.com> In-Reply-To: Subject: Prepared statements generating a lot of temp files. MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_160877_511433589.1679562319453" Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_160877_511433589.1679562319453 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi admins, I am analyzing temp files being generated using pg_badger. Under "queries generating the most temporary files", I am finding insert/update queries (via prepared statements) writing a lot of data to temp files. I am trying to figure why inserts are generating such temp files. Why are inserts/updates generating temp files? what can be done to avoid this ? thanks, karthik ------=_Part_160877_511433589.1679562319453 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: 7bit
Hi admins,

I am analyzing temp files being generated using pg_badger.
Under "queries generating the most temporary files", I am finding insert/update queries (via prepared statements) writing a lot of data to temp files.
I am trying to figure why inserts are generating such temp files.
Why are inserts/updates generating temp files?
what can be done to avoid this ?

thanks,
karthik

------=_Part_160877_511433589.1679562319453--