Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

could not write to hash-join temporary file: No space left on device

I am executing PostgreSQL functions to update a table which has a huge amount of data and the update happens for about 100000 records everyday. During the update I get an error saying:

"could not write to hash-join temporary file: No space left on device"

I have not really been able to get something useful to overcome this error. I got something where it says to SET a temporary table spaces. But I was not able to find how do I create a temporary table space where the data will be stored during the executing of the update procedure.

like image 806
Yousuf Sultan Avatar asked Apr 13 '15 09:04

Yousuf Sultan


2 Answers

  1. SQL> create tablespace temp_tbs location '/some/big/disk';
  2. change temp_tablespaces = 'temp_tbs' in postgresql.conf.
  3. select pg_reload_conf();
  4. enjoy
like image 189
Vao Tsun Avatar answered Nov 10 '22 02:11

Vao Tsun


I got the same issue, but I was working with docker.

Just in case if you are working with docker too, go to:

Docker Preferences > Disk Panel > Disk image size and increase it.

It solved my problem.

like image 2
pruthvi nath Avatar answered Nov 10 '22 04:11

pruthvi nath