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 1lqFYg-0008OP-FX for pgsql-general@arkaria.postgresql.org; Mon, 07 Jun 2021 13:44:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lqFYf-0007B2-Fm for pgsql-general@arkaria.postgresql.org; Mon, 07 Jun 2021 13:44:49 +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 1lqFYf-0007Au-6K for pgsql-general@lists.postgresql.org; Mon, 07 Jun 2021 13:44:49 +0000 Received: from st43p00im-zteg10072001.me.com ([17.58.63.167]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqFYd-0000Mb-Br for pgsql-general@lists.postgresql.org; Mon, 07 Jun 2021 13:44:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1623073485; bh=wPsmYzox35hzG7zic+ulRFJrMSsVTX2kIMJMWqcgKJU=; h=From:Content-Type:Mime-Version:Subject:Date:Message-Id; b=UIhdO31bNEiVbzSkNvLU0prL/VYS7sMFgqufzYWE4iaZwxuuLMoLV6wpyBJ1qQSNn esyk0DCicX7lONpk3/EV93Rj8TtyQ8RLguSl9SfLqhRCkDgx4+M626shCyEQXfliL2 rk0cCZ6NBs2o+E/HR9JftIRzy4Bzl5jGI9HhJ5Jhg0jhwXzZYFfY3qwzJdCRJBoAJJ xaiI3Vt4jQd+pRnGCqU31snIS4qYggKxCXcVbPcVDKjE1godQnQUmaBkPsw6d5n0kP R7MZGouN5SNldLb06DZ9hwEzVrIJGyLw9qa5lrK9ZeeUw7VnWKdVcYh5y3VvNk/GKQ FOEAGvMJuA4Jg== Received: from smtpclient.apple (c-69-248-135-247.hsd1.nj.comcast.net [69.248.135.247]) by st43p00im-zteg10072001.me.com (Postfix) with ESMTPSA id 528ADC07AD for ; Mon, 7 Jun 2021 13:44:45 +0000 (UTC) From: Ravi Krishna Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Subject: Re: base directory size getting increased Date: Mon, 7 Jun 2021 09:44:44 -0400 In-Reply-To: Cc: pgsql-general References: <1134292be1b2c9e33e6bd6dd0c0fd53a565403ce.camel@cybertec.at> Message-Id: X-Mailer: Apple Mail (2.3654.80.0.2.43) X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.391,18.0.761,17.0.607.475.0000000_definitions?= =?UTF-8?Q?=3D2021-06-07=5F10:2021-06-03=5F01,2021-06-07=5F10,2020-04-07?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 malwarescore=0 suspectscore=0 adultscore=0 clxscore=1015 spamscore=0 mlxscore=0 mlxlogscore=795 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2106070102 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk >=20 > initially pgsql_tmp size was 87 GB and after execution of query it was > started increasinng beyond 87GBs so yes, pgsql_tmp directory size is > getting increased while exporting data into csv file. >=20 > But once I rolled back the query, pgsql_tmp directory it was back to > 87 GBs so please help me in telling how do I clean that 87GB of space > of pgsql_tmp directory. >=20 Ideally applications which creates temp table should drop it when no = longer needed. When not dropped, they get dropped automatically when the session which = created them terminates. Looks like in your case both are not happening. Which is the oldest session still shown as connected?=