[Tile-serving] [openstreetmap/osm2pgsql] Database error: ERROR: cannot execute CREATE FUNCTION in a read-only transaction (Discussion #2075)
Goncalo Oliveira
notifications at github.com
Sat Sep 9 14:16:41 UTC 2023
Hi,
I'm having issues trying to copy data into a database. This is happening with region europe/great-britain/england, if I use a smaller region, like greater london, I don't have this issue. The copy process seems to run until the end, but somewhere trying to build indexes, I get a read-only transaction error.
```
2023-09-09 12:24:19 osm2pgsql version 1.9.2
2023-09-09 12:24:19 Database version: 15.4
2023-09-09 12:24:19 PostGIS version: 3.2
2023-09-09 12:24:20 Storing properties to table '"public"."osm2pgsql_properties"'.
2023-09-09 12:24:23 Setting up table 'planet_osm_point'
2023-09-09 12:24:23 Setting up table 'planet_osm_line'
2023-09-09 12:24:24 Setting up table 'planet_osm_polygon'
2023-09-09 12:24:25 Setting up table 'planet_osm_roads'
2023-09-09 14:29:38 Reading input files done in 7513s (2h 5m 13s).
2023-09-09 14:29:38 Processed 137635681 nodes in 474s (7m 54s) - 290k/s
2023-09-09 14:29:38 Processed 21132737 ways in 1074s (17m 54s) - 20k/s
2023-09-09 14:29:38 Processed 218809 relations in 5965s (1h 39m 25s) - 37/s
2023-09-09 14:29:41 Clustering table 'planet_osm_polygon' by geometry...
2023-09-09 14:29:41 Clustering table 'planet_osm_line' by geometry...
2023-09-09 14:29:41 Clustering table 'planet_osm_point' by geometry...
2023-09-09 14:29:41 Clustering table 'planet_osm_roads' by geometry...
2023-09-09 14:30:36 Done postprocessing on table 'planet_osm_nodes' in 0s
2023-09-09 14:30:37 Building index on table 'planet_osm_rels'
2023-09-09 14:30:37 Building index on table 'planet_osm_ways'
2023-09-09 14:30:37 ERROR: Database error: ERROR: cannot execute CREATE FUNCTION in a read-only transaction
```
This is a clean database, hosted on Digital Ocean (1 vcpu, 2 GB memory, 30 GB SSD), only initialized with the required extensions. I've retried this process a few times, but it always ends the same way.
The command is being executed as follows
```bash
osm2pgsql --create --slim -C 1000 \
--hstore-all \
data.osm.pbf
```
Can anyone provide some assistance?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/discussions/2075
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/repo-discussions/2075 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230909/02bd6157/attachment.htm>
More information about the Tile-serving
mailing list