osm2pgsql导入duplicate key error in slim mode
This is a well known issue and one that is likely not going to be addressed any time soon.
While the rendering tables allow multiple geometries per osm feature / id and therefore don't have a unique constraint on osm_id, the slim tables are used for update processing and thus need to do lookups based on osm_id, for which it has to be unique.
For performance reasons osm2pgsql uses the COPY command, that batches up inserts into a single command. As such, if there is a unique constraint (or duplicate Key) violation, the whole batch fails. As osm2pgsql does stream based processing, it does not have the ability to go back and reprocess that batch of nodes / ways / relations to properly deal with the duplicate entry. Therefore, it cannot recover from such a duplicate key failure and terminates.
Osm2pgsql therefore doesn't support importing multiple files into one database in slim mode if there are duplicate osm features. Instead, I would recommend merging the two files prior to importing with osm2pgsql. For example with osmosis that supports de-duplication on merge.
参考: https://github.com/openstreetmap/osm2pgsql/issues/16#event-165848217
osm2pgsql导入duplicate key error in slim mode的更多相关文章
- E11000 duplicate key error index
E11000 duplicate key error index mongodb插入报错,重复主键问题,有唯一键值重复 一般使用collection.insertOne(doc);插入一条已存在主键的 ...
- mongodb E11000 duplicate key error collection: index: _id_ dup key
今天在单测的时候,出现这个问题. 我代码只定义了一个变量 let body = {name: 'wu'} 然后连续2次插入这个body数据 await exam.insertExam(body); a ...
- E11000 duplicate key error index: test.collection.$a.b_1 dup key: { : null } 报错记录
这个一般分为两种情况,第一新增数据出现约束.而你在orm里面写了唯一约束.这种情况就比较简单,添加数据时保证数据字段唯一性就好了. 第二种情况比较难找,因为你发现你在orm里面并没有写约束,但是还是插 ...
- mysql archive存储引擎导入数据报duplicate key
DROP TABLE IF EXISTS `test`;CREATE TABLE `test` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ve ...
- Error: Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061) ----Hive schematool -initSchema -dbType mysql
schematool -initSchema -dbType mysqlMetastore connection URL: jdbc:mysql://localhost/metastore_db?cr ...
- Error: Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061)
以下异常说明mysql已经启动. 应先关掉先前启动的mysql.再执行初始化schema操作. $service mysql stop; # $HIVE_HOME/bin/schematool -db ...
- mysql 之SQL语句--NSERT SELECT ON DUPLICATE KEY UPDATE的写法
Table source CREATE TABLE `source` ( `key` int(11) NOT NULL AUTO_INCREMENT, `data` int(11) DEFAULT N ...
- [BTS]The join order has been enforced because a local join hint is used.;Duplicate key was ignored.".
在一个客户的BizTalk Server 2013 R2环境中会报如下的ERROR,查找相关资料后,先试试停掉所有Trace. Log Name: ApplicationSource: ...
- INSERT ... ON DUPLICATE KEY UPDATE Syntax
一 mybatis中返回自动生成的id 当有时我们插入一条数据时,由于id很可能是自动生成的,如果我们想要返回这条刚插入的id怎么办呢.在mysql数据中我们可以在insert下添加一个selectK ...
随机推荐
- 委托的N种写法
一.委托调用方式 1. 最原始版本: delegate string PlusStringHandle(string x, string y); class Program { static void ...
- 使用VS2017 编写Linux系统上的Opencv程序
背景 之前写图像算法的程序都是在window10下使用VS编写,VS这个IDE结合“ImageWatch.vsix“插件,用于调试opencv相关的图像算法程序十分方便.后因项目需要,需将相关程序移植 ...
- nodejs 中的 NODE_PATH
在使用 nodejs 开发中我们都免不了要去安装一些第三方模块. 那么你或多或少的遇到过以下一些问题 再继续阅读之前,我们先来弄清楚一个概念. npm install --global xxx 属于全 ...
- LevelDB Cache实现机制分析
几天前淘宝量子恒道在博客上分析了HBase的Cache机制,本篇文章,结合LevelDB 1.7.0版本的源码,分析下LevelDB的Cache机制. 概述 LevelDB是Google开源的持久化K ...
- 微信小程序之工具js封装与使用
工具库的创建与使用 创建一个common文件夹 在common文件夹中创建一个utils文件夹 在utils文件夹中创建util.js // 工具 function tool() { console. ...
- Oracle常见的表连接的方法
1 排序合并连接SMJ Sort merge join 排序合并总结: 1 通常情况下,排序合并连接的效率远不如hash join,前者适用范围更广,hj只使用于等值连接,smj范围更广(<,& ...
- 2014.8.25 CAD系统事件触发流程
各进近.离场.进场Arinc424数据录入界面在CADDataManager/UC/UCIAP(UCSID)下 UCAirport是一抽象用户控件类,在FormADHP初始化时实例化成airport控 ...
- Deep Learning 学习笔记(6):神经网络( Neural Network )
神经元: 在神经网络的模型中,神经元可以表示如下 神经元的左边是其输入,包括变量x1.x2.x3与常数项1, 右边是神经元的输出 神经元的输出函数被称为激活函数(activation function ...
- xp远程桌面连接最大用户数怎么设置?
1.首先到网上去百度下载“补丁UniversalTermsrvPatch”,这个补丁主要目的是在于去除“单用户登陆的限制”,允许多人多用户同时并行访问登录;2.然后根据自己的系统运行对应的程序:系统是 ...
- C# web程序,winform程序,控制台程序配置log4net,使用log4net
第一添加log4net.config,这里配置包括信息提示写入,错误信息写入,控制台消息展示 <?xml version="1.0" encoding="utf-8 ...