无法写入散列连接临时文件:设备上没有剩余空间

You*_*tan 11 postgresql performance space tablespace

我正在执行PostgreSQL函数来更新具有大量数据的表,并且每天更新大约100000条记录.在更新期间,我收到一条错误消息:

"could not write to hash-join temporary file: No space left on device"
Run Code Online (Sandbox Code Playgroud)

我真的没能得到一些有用的东西来克服这个错误.我得到了一些东西,它说要设置临时表空间.但我无法找到如何创建临时表空间,在执行更新过程期间将存储数据.

对此的快速帮助将不胜感激.提前致谢.

Vao*_*sun 9

  1. SQL> create tablespace temp_tbs location '/some/big/disk';
  2. temp_tablespaces = 'temp_tbs'在postgresql.conf中更改.
  3. select pg_reload_conf();
  4. 请享用

  • SET temp_tablespaces = temp_tbs;也可以使用 (2认同)