我与执行批量复制到Postgres的有关数据的80GB超时。PSQL似乎有长的查询
\copy my_table FROM '/path/csv_file.csv' csv DELIMITER ','
事务提交之前,我得到以下错误。
服务器关闭了连接意外 这可能意味着服务器之前或在处理请求异常 终止。
在PostgreSQL的日志:
LOG:server process (PID 21122) was terminated by signal 9: Killed
LOG:terminating any other active server processes
WARNING:terminating connection because of crash of another server process
DETAIL:The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
副本是在本地主机上还是通过远程连接运行?我会说你亲自看到后端崩溃。查看PostgreSQL错误日志以获取详细信息。如果你有很高的work_mem或者maintenance_work_mem,可能你的内存不足了?或者你的磁盘空间不足 - 尽管这通常会产生更好的错误。无论如何,还有什么是精确的PostgreSQL版本? – 2013-05-07 11:55:05
该版本是8.4.11。我在远程机器上运行它。我被打进盒子里,但我正在使用'屏幕'。我在日志中看到了这一点“考虑增加配置参数”checkpoint_segments“” – 2013-05-07 12:16:42
只是为了阐明,'psql'与数据库运行在同一台机器上?不管它是否远离你,只要它远离'psql'客户端;如果你使用'psql'与'localhost'上的数据库进行通信,它不会成为网络问题。 – 2013-05-07 12:25:23