使用 osm2pgsql 将 .pbf 转换为 postgresql(磁盘空间不足 space)

Converting .pbf to postgresql using osm2pgsql (not enough disk space)

我必须说我完全不明白这一点。

但是当我尝试使用 osm2pgsql(slim 模式)为我的国家德国转换一个大小为 3gb 的二进制 pbf 文件时,它被转换为 postgresql 表 3 小时并失败并显示消息 'not enough disk space' .我的 linux 机器中有 50gb 免费 space。

我可以理解临时文件被正常添加到 RAM 中,并且因为我使用的是精简模式,所以它被保存到数据库中。

请赐教,一个 3gb 的 osm 文件在转换为 postgresql(gis) 表时如何占用 50gb space 并抛出该错误?

我该如何解决这个问题?

是的,它可以超过 50GB。由于印度 pbf 约为 375mb,而 PostgreSQL 数据文件夹大小为 11gb,其中包括来自 OSM 的世界边界。