我正在执行PostgreSQL函数以更新一个拥有大量数据的表格,每天需要更新约100000条记录。在更新过程中,我收到了以下错误提示:
"could not write to hash-join temporary file: No space left on device"
我并没有真正找到有用的方法来解决这个错误。我找到了一个说需要设置临时表空间的方法,但是我不知道如何创建一个能够在更新过程执行期间存储数据的临时表空间。
我正在执行PostgreSQL函数以更新一个拥有大量数据的表格,每天需要更新约100000条记录。在更新过程中,我收到了以下错误提示:
"could not write to hash-join temporary file: No space left on device"
我并没有真正找到有用的方法来解决这个错误。我找到了一个说需要设置临时表空间的方法,但是我不知道如何创建一个能够在更新过程执行期间存储数据的临时表空间。
SQL> create tablespace temp_tbs location '/some/big/disk';
temp_tablespaces = 'temp_tbs'
。select pg_reload_conf();
SET temp_tablespaces = temp_tbs;
- Vivek S.SET temp_tablespaces
只会在您的会话中持续有效。 - mlissnergrant create on tablespace temp_space to public;
。否则只有 postgres
用户可以使用该表空间。 - mlissnerDocker Preferences
> Disk Panel
> Disk image size
并增加它。