postgres数据库报错无法写入文件 “base/pgsql_tmp/pgsql_tmp215574.97“: 设备上没有空间

解决思路:

base/pgsql_tmp下临时表空间不够

需要新建一个临时表空间指定到根目录之外的其他目录

并且修改默认临时表空间参数

解决方法:

sql 复制代码
 select * from pg_settings where name = 'temp_tablespaces';
  
mkdir /home/postgres/tbs_tmp
CREATE TABLESPACE tbs_tmp LOCATION '/home/postgres/tbs_tmp/';
	
alter system set temp_tablespaces='tbs_tmp';

 select pg_reload_conf();

或者会话级别处理

sql 复制代码
mkdir /home/postgres/tbs_tmp
CREATE TABLESPACE tbs_tmp LOCATION '/home/postgres/tbs_tmp/';
set session temp_tablespaces='tbs_tmp';

参考文章:https://blog.csdn.net/weixin_34194702/article/details/89750375

相关推荐
醉风塘1 分钟前
JDBC批量操作终极指南:PreparedStatement批处理与事务性能优化实战
数据库·性能优化
2401_838472515 分钟前
使用Python处理计算机图形学(PIL/Pillow)
jvm·数据库·python
invicinble25 分钟前
对于mysql层对sql层面的知识体系的理解和把握
数据库·sql·mysql
2301_7903009627 分钟前
用Matplotlib绘制专业图表:从基础到高级
jvm·数据库·python
DFT计算杂谈1 小时前
VASP+PHONOPY+pypolymlpj计算不同温度下声子谱,附批处理脚本
java·前端·数据库·人工智能·python
数据知道1 小时前
PostgreSQL核心原理:为什么数据库偶尔会卡顿?
数据库·postgresql
Nandeska1 小时前
14、MySQL基于GTID的数据同步
数据库·mysql
Mr_Xuhhh1 小时前
MySQL表的内连接与外连接详解
java·前端·数据库
l1t1 小时前
DeepSeek辅助总结postgresql wiki提供的数独求解器
数据库·sql·postgresql