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 1khdWz-0004eB-1v for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Nov 2020 18:59:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1khdWx-0006g6-RR for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Nov 2020 18:59:11 +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 1khdWx-0006fz-LR for pgsql-bugs@lists.postgresql.org; Tue, 24 Nov 2020 18:59:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khdWr-00047y-G8 for pgsql-bugs@lists.postgresql.org; Tue, 24 Nov 2020 18:59:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0AOIx2oG294249; Tue, 24 Nov 2020 13:59:02 -0500 From: Tom Lane To: Maxim Boguk cc: Manoj Kumar , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16739: Temporary files not deleting from data folder on disk In-reply-to: References: <16739-01bbd1b6e3a30313@postgresql.org> <57259.1606145601@sss.pgh.pa.us> Comments: In-reply-to Maxim Boguk message dated "Tue, 24 Nov 2020 20:51:04 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <294247.1606244342.1@sss.pgh.pa.us> Date: Tue, 24 Nov 2020 13:59:02 -0500 Message-ID: <294248.1606244342@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Maxim Boguk writes: > It seems that these temp files are the result of normal query execution > (and will be cleared when query finishes). > Have you tried enabling log_temp_files and check what query generates these > temp files? Judging by the file names, these are temp tables (created by CREATE TEMP TABLE or the like), not temp files generated during query execution. The latter would have names beginning in "pgsql_tmp", if I read the code correctly. regards, tom lane