[Tile-serving] [openstreetmap/osm2pgsql] Latest master blocks running osm2pgsql multiple times consecutively with --create (Issue #2010)

mboeringa notifications at github.com
Sun Jul 23 20:18:19 UTC 2023


<!-- Please don't use screenshots. Copy and paste the *text* output here if that's needed for context. -->

## What version of osm2pgsql are you using?

Latest master:

> osm2pgsql --version
2023-07-23 22:08:09  osm2pgsql version 1.8.1 (1.8.1-183-g5dba2405)
Build: RelWithDebInfo
Compiled using the following library versions:
Libosmium 2.19.0
Proj [API 6] 8.2.1
Lua 5.1.4 (LuaJIT 2.1.0-beta3)

## What operating system and PostgreSQL/PostGIS version are you using?

Postgres version: 15.3 (Ubuntu 15.3-1.pgdg22.04+1)
PostGIS version: POSTGIS="3.3.3 2355e8e" [EXTENSION] PGSQL="150" GEOS="3.10.2-CAPI-1.16.0" PROJ="8.2.1" LIBXML="2.9.13" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)"


## Tell us something about your system

<!-- How much RAM do you have, how many CPUs, bare metal or cloud setup? -->


## What did you do exactly?

With latest master, I imported once with the **--create** option, then a second them, again with **--create**. This failed with a warning of a pre-existing 'osm2pgsql_properties' relation. Note that the second run used _modified command line options_ for testing, compared to the first run.

> osm2pgsql -O flex -d gis -U osm --create -W --number-processes 32 -P 5433 -S 'osm2pgsql/flex-config/openstreetmap-carto.lua' 'data/planet-230717.osm.pbf'
2023-07-23 20:23:52  osm2pgsql version 1.8.1 (1.8.1-183-g5dba2405)
Password:
2023-07-23 20:24:00  Database version: 15.3 (Ubuntu 15.3-1.pgdg22.04+1)
2023-07-23 20:24:00  PostGIS version: 3.3
2023-07-23 20:24:00  Storing properties to table 'osm2pgsql_properties'.
2023-07-23 20:24:00  ERROR: Database error: ERROR:  relation "osm2pgsql_properties" already exists


## What did you expect to happen?

I would expect an existing 'osm2pgsql_properties' relation to be always dropped if I run with **--create**, or at least not block running with **--create** a second time and possibly update the existing values in the table.

## What did happen instead?

osm2pgsql blocks running with the --create option a second time if there is a pre-existing 'osm2pgsql_properties' relation.

## What did you do to try analyzing the problem?

<!-- Describe what steps you already did to try analyzing the problem before
reporting. -->



-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/2010
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/issues/2010 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230723/2ca7bbbb/attachment.htm>


More information about the Tile-serving mailing list