I've been trying to import map data into PostgreSQL 12 database (on Ubuntu 20.04.5 with wsl) using osm2pgsql, but I get this error after executing this command:
$ osm2pgsql -U postgres -H localhost -d gis --port 5434 -W "map_1.osm" - style openstreetmap-carto.style - slim
osm2pgsql version 1.2.1 (64 bit id space)
Password:
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=800MB, maxblocks=12800*65536, allocation method=3
Using built-in tag processing pipeline
Using projection SRS 3857 (Spherical Mercator)
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Reading in file: map_1.osm
Using XML parser.
Processing: Node(332k 332.6k/s) Way(24k 24.24k/s) Relation(20 20.00/s) parse time: 2s
Reading in file: -
terminate called after throwing an instance of 'std::runtime_error'
what(): stop COPY_END for planet_osm_line failed: no COPY in progress Aborted