内存不足,或磁盘空间不足?

我正在运行一个数据库加载过程(osm2pgsql),这是失败的:

Processing: Node(17404k 148.8k/s) Way(1351k 6.38k/s) Relation(9520 29.94/s)way_done failed: ERROR: could not extend file "base/140667/152463": No space left on device HINT: Check free disk space. (7) Arguments were: 187226311, 

在导入开始时, mem报告:

  total used free shared buffers cached Mem: 31G 29G 2.4G 0B 178M 24G -/+ buffers/cache: 4.5G 26G Swap: 0B 0B 0B 

结束前不久:

  total used free shared buffers cached Mem: 31G 31G 227M 0B 178M 26G -/+ buffers/cache: 4.8G 26G Swap: 0B 0B 0B 

同时, df在开始时:

 Filesystem 1K-blocks Used Available Use% Mounted on /dev/vda1 10309828 7879412 1997036 80% / udev 16470572 12 16470560 1% /dev tmpfs 6590080 260 6589820 1% /run none 5120 0 5120 0% /run/lock none 16475196 0 16475196 0% /run/shm none 102400 0 102400 0% /run/user /dev/vdb 247709760 105978300 129148548 46% /mnt 

从整个过程的3/4左右开始。 使用坐在100%。

 Filesystem 1K-blocks Used Available Use% Mounted on /dev/vda1 10309828 9854348 22100 100% / udev 16470572 12 16470560 1% /dev tmpfs 6590080 260 6589820 1% /run none 5120 0 5120 0% /run/lock none 16475196 0 16475196 0% /run/shm none 102400 0 102400 0% /run/user /dev/vdb 247709760 105978300 129148548 46% /mnt 

我无法识别正在填满/ dev / vda1的磁盘上的任何实际文件:

 du -h -d 3 / 2>/dev/null | grep -v ^0 > /tmp/o2p1.txt [start import] du -h -d 3 / 2>/dev/null | grep -v ^0 > /tmp/o2p2.txt diff /tmp/o2p1.txt /tmp/o2p2.txt 

这没有任何显示。

这是怎么回事?

好吧,这很简单。 Postgres数据库在/ dev / vda1上,变得越来越庞大。 它没有出现在du命令中,因为我没有以root身份运行。

我想在磁盘填满之后,Postgres会停止保存到磁盘并保存在内存中,直到内存耗尽为止。