[Tile-serving] [openstreetmap/osm2pgsql] Unable to insert OSM data to PostgreSQL due to ERROR: must be owner of relation planet_osm_nodes (#1068)
niki7s1x
notifications at github.com
Tue Oct 26 07:51:29 UTC 2021
Hello,
I've got the same issue with this tutorial and share my problem solving here in the following steps...
In the Ubuntu' terminal window and from "renderaccount":
_Login as Ubuntu's built-in user "postgres"_
**$ sudo -u postgres -i**
_Connect to database "gis"_
**postgres=# \c gis**
You are now connected to database "gis" as user "postgres".
_List the "gis"' tables_
**gis=# \dt**
List of relations
Schema | Name | Type | Owner
--------+------------------+-------+---------------
public | planet_osm_nodes | table | postgres
public | planet_osm_rels | table | postgres
public | planet_osm_ways | table | postgres
public | spatial_ref_sys | table | renderaccount
(4 rows)
_Change the tables' ownership_
**gis=# ALTER TABLE planet_osm_nodes OWNER TO renderaccount;
ALTER TABLE
gis=# ALTER TABLE planet_osm_rels OWNER TO renderaccount;
ALTER TABLE
gis=# ALTER TABLE planet_osm_ways OWNER TO renderaccount;
ALTER TABLE**
_List the "gis"' tables to confirm changes_
**gis=# \dt**
List of relations
Schema | Name | Type | Owner
--------+------------------+-------+---------------
public | planet_osm_nodes | table | renderaccount
public | planet_osm_rels | table | renderaccount
public | planet_osm_ways | table | renderaccount
public | spatial_ref_sys | table | renderaccount
(4 rows)
_Leave "gis"_
**gis-# \q**
_Logout "postgres"_
**postgres at MyWorkstation:~$ exit**
logout
...again in the "renderaccount"
**$ osm2pgsql -d gis --create --slim -G --hstore --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua -C 2500 --number-processes 1 -S ~/src/openstreetmap-carto/openstreetmap-carto.style ~/data/bulgaria-latest.osm.pbf**
...Proceed with the tutorial.
Goodluck!
--
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#issuecomment-951654647
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20211026/b6626a72/attachment.htm>
More information about the Tile-serving
mailing list