[Tile-serving] [openstreetmap/osm2pgsql] Unable to insert OSM data to PostgreSQL due to ERROR: must be owner of relation planet_osm_nodes (#1068)

vaunakiller notifications at github.com
Fri Jan 31 09:17:28 UTC 2020


Hello everyone.
I'm following a tutorial 'Manually Building a Tilemap Server - ubuntu 16.04 ' from switch2osm
I've got to a point where I have to import OSM data, but stuck with an error

Input
`root at dev:~# osm2pgsql -d gis --create --slim  -G --hstore --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua -C 500 --number-processes 1 -S ~/src/openstreetmap-carto/openstreetmap-carto.style ~/data/azerbaijan-latest.osm.pbf -U renderaccount -W`

Output
`osm2pgsql version 1.2.0 (1.2.0-242-g76a3e78) (64 bit id space)
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=500MB, maxblocks=8000*65536, allocation method=11
Mid: pgsql, cache=500
Setting up table: planet_osm_nodes`

`SQL command failed: ERROR:  must be owner of relation planet_osm_nodes`

`Full query: DROP TABLE IF EXISTS planet_osm_nodes CASCADE
node cache: stored: 0(0.00%), storage efficiency: 0.00% (dense blocks: 0, sparse nodes: 0), hit rate: 0.00%
Osm2pgsql failed due to ERROR: Executing SQL`

As the ERROR text states, user **renderaccount** must be an owner of the relation **planet_osm_node** but:

1. That relation does not exist just yet.
2. The whole db gis were created with **renderaccount** user at the earlier step of the tutorial with `createdb -E UTF8 -O renderaccount gis`, shouldn't that grant **renderaccount** user an ownership of aforementioned relation by default?
3. As a solution I've tried to run `GRANT postgres TO renderaccount` but to no avail

Any help on resolving the issue is appreciated, thank you

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1068
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20200131/fc1bd14a/attachment.htm>


More information about the Tile-serving mailing list