Once the work_mem , temp_buffer or maintenence_work_mem is full where does the PostgreSQL writes to the disk, what is the location of temporary files by default
-
2Does this answer your question? Setting location of temp files for Postgresql backend (9.3.10)mustaccio– mustaccio2020年12月04日 16:35:07 +00:00Commented Dec 4, 2020 at 16:35
1 Answer 1
Temporary files (for operations such as sorting more data than can fit in memory) are created within
PGDATA/base/pgsql_tmp
, or within apgsql_tmp
subdirectory of a tablespace directory if a tablespace other than pg_default is specified for them. The name of a temporary file has the formpgsql_tmpPPP.NNN
, wherePPP
is the PID of the owning backend andNNN
distinguishes different temporary files of that backend