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 1lqFe6-0000Ap-Hj for pgsql-general@arkaria.postgresql.org; Mon, 07 Jun 2021 13:50:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lqFe5-0004PW-GI for pgsql-general@arkaria.postgresql.org; Mon, 07 Jun 2021 13:50:25 +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 1lqFe5-0004PO-3p for pgsql-general@lists.postgresql.org; Mon, 07 Jun 2021 13:50:25 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lqFdz-0000QD-BX for pgsql-general@lists.postgresql.org; Mon, 07 Jun 2021 13:50:24 +0000 Received: by mail-wr1-x436.google.com with SMTP id c9so9027764wrt.5 for ; Mon, 07 Jun 2021 06:50:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=qsBiKoVgDSXha5Qjkf1c4qSp7S+0aKnfqGKslvrgYwk=; b=P2nMRVKr80Yz10Qd2T760uEVVwWBDybWi0zAshlMrUMiYjBkvRNdi14ycEOQnKfwY/ GqzUGl53QMXjXS0ipvRY6e8sOQWsYA0qNsj/4su0ozrz05pzAwL83R9UGYqYJKSb1jXT gKWJtM++vVxTvT82SFlNFnHPitN9pinrsrXI9MAAdY1aU867G2jnsIuMJ73pmQd5mEsp h58iYXqDE/7XJKaw/VK9HQC8150bXvGEZldsxkUpux/Q6T3T+x7kBAu9LUAP1M1jVpKe 9WnxaE3V0GSHqdFx4JzpnYzwmDIJDvzoigpaSzoUiFdZUY9Z32ZtoSQ2R2F/76Btyq+/ 5lmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=qsBiKoVgDSXha5Qjkf1c4qSp7S+0aKnfqGKslvrgYwk=; b=rXc9DqKld9XdO5bioEle8pw6GG1BxGcXWxda/xIaTrpVv9S3XUwzRNw+1p92TpMPlJ OeqLdPhOzFjv7O6TZ6bH4MyYaPtspIVY6TKuyPgN9lweIqNZOQcRzNIhaGzg9wjxMmJV FbOSLltj82pd3Ua3OkLUfkjHbDFl6LPMNTCAvlTimuNNaHDg70ylNcOnCYTm++mejJAc xu3ewVqwdbvdMSIOM8cJXHN4fiiNjt62fqnMKP1VGLhHIvOloXEYB1tzYH723X46+0ZV qrPJM0edUSfZQtF6ti+buJlUXUcdhqfMa4whQhRn191eWEEL7/zxnGINyrdr+uw5XoHr O4nA== X-Gm-Message-State: AOAM532HbSxzB7MKqFcw9FTuDg+NFAVuNOyye5KpJwxoRAG3K9N7wyU9 slJagEGVlu2gnyCyK0vQ1mJpCA== X-Google-Smtp-Source: ABdhPJzIKQMvzPn9w2TdMJMFsDjdpI5vBFdq5tzIuDzaW2RMxTupehTHvU7SEQ8oOTOgE69tMNK0Pw== X-Received: by 2002:adf:fe8c:: with SMTP id l12mr17530188wrr.26.1623073818112; Mon, 07 Jun 2021 06:50:18 -0700 (PDT) Received: from localhost.localdomain (217-149-172-244.nat.highway.telekom.at. [217.149.172.244]) by smtp.gmail.com with ESMTPSA id a15sm19380064wrs.63.2021.06.07.06.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 06:50:17 -0700 (PDT) Message-ID: <7f74489c1e3faaf12583c192ff57b3f28f4c02b6.camel@cybertec.at> Subject: Re: base directory size getting increased From: Laurenz Albe To: Atul Kumar Cc: pgsql-general Date: Mon, 07 Jun 2021 15:50:17 +0200 In-Reply-To: References: <1134292be1b2c9e33e6bd6dd0c0fd53a565403ce.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2021-06-07 at 17:48 +0530, Atul Kumar wrote: > 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. > > 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. The files in that directory will always be cleaned up when the query that uses the temporary files is done. The backend process ID of the query is part of the temporary file name. It could be that such files are left behind after a crash. If you are sure that the don't belong to a running query (for example, if their modification timestamp is old), you can delete them. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com