天天看点

如果调整临时文件限制temp_file_limit

temp_file_limit的缺省值为10GB(10000000,单位kB),如果因为创建索引、运行大查询,可能超过此限制:

CREATE UNIQUE INDEX ix_gl_balance_1 ON t_gl_balance USING btree (corp_id, acct_year, acct_period, subject_id, curr_id);
ERROR:  temporary file size exceeds temp_file_limit (10000000kB)           

可以临时修改。方法如下:

对于PPAS:

rds_set_conf_for_all_roles('temp_file_limit','100000000');

对于PG:

alter role all set temp_file_limit = 100000000

注意,作为临时操作后,需要把它再改回来,避免误用临时空间导致占满磁盘。

继续阅读