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. Regards, Atul On 6/7/21, Laurenz Albe <laurenz.albe@xxxxxxxxxxx> wrote: > On Mon, 2021-06-07 at 16:11 +0530, Atul Kumar wrote: >> I have a query from which I am trying to export the data into a csv >> file(around 10 lakhs record) but when I am doing so the base sub >> directory size of data directory is getting increased. >> >> can someone help me in telling 'why base sub directory size is getting >> increased'? >> >> my postgres version is 9.6. > > Based on the little information you gave us, it could be one of > > - temporary files that get created by the query > - you export the data into the data directory > > Yours, > Laurenz Albe > -- > Cybertec | https://www.cybertec-postgresql.com > >