Thread: pgsql_tmp( Temporary tablespace)

pgsql_tmp( Temporary tablespace)

From
"suhas.basavaraj12"
Date:
Hi,

This folde( Temporary tablespace) is getting filled and size increases in
the day where there lots of sorting operations.But after some times the data
in the is deleted automatically .  Can any one explain what is going on ?

Rgrds
Suhas



--
View this message in context: http://postgresql.1045698.n5.nabble.com/pgsql-tmp-Temporary-tablespace-tp5733858.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.


Re: pgsql_tmp( Temporary tablespace)

From
"Albe Laurenz"
Date:
suhas.basavaraj12 wrote:
> This folde( Temporary tablespace) is getting filled and size increases
in
> the day where there lots of sorting operations.But after some times
the data
> in the is deleted automatically .  Can any one explain what is going
on ?

Must be temporary files created by the sorting operations.
If a sort, hash or similar operation is estimated to need
more than work_mem if done in memory, data will be dumped
to disk instead.

If you want to avoid that, you need to increase work_mem
(but make sure you don't run out of memory).

Yours,
Laurenz Albe


Re: pgsql_tmp( Temporary tablespace)

From
"suhas.basavaraj12"
Date:
Hi,


Can i delete the content of this folder. I have observed couple of times ,
this folder got cleaned automatically.
Which backend process deletes  the data from this folder .Any Idea?

Rgrds
Suhas






--
View this message in context:
http://postgresql.1045698.n5.nabble.com/pgsql-tmp-Temporary-tablespace-tp5733858p5733863.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.


Re: pgsql_tmp( Temporary tablespace)

From
"Albe Laurenz"
Date:
suhas.basavaraj12 wrote:
> Can i delete the content of this folder. I have observed couple of
times ,
> this folder got cleaned automatically.

These files are in use and you should not delete them.
If you need them to go right now, cancel the queries that
create temporary files.

If there are any leftover when PostgreSQL is shut down
(don't know if that can happen), it should be safe to
delete them.

> Which backend process deletes  the data from this folder .Any Idea?

I'm not sure, but probably the one that created them.

Yours,
Laurenz Albe