<p></p>
<p dir="auto">Hi,</p>
<p dir="auto">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.</p>
<pre class="notranslate"><code class="notranslate">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
</code></pre>
<p dir="auto">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.</p>
<p dir="auto">The command is being executed as follows</p>
<div class="highlight highlight-source-shell" dir="auto"><pre class="notranslate">osm2pgsql --create --slim -C 1000 \
--hstore-all \
data.osm.pbf</pre></div>
<p dir="auto">Can anyone provide some assistance?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/discussions/2075">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353XU6XAFT2P7AYM2CTLXZR24TANCNFSM6AAAAAA4RPI4TU">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AA6353XN3WOOEXHWQ2MMA6TXZR24TA5CNFSM6AAAAAA4RPI4TWWGG33NNVSW45C7OR4XAZNKIRUXGY3VONZWS33OVJRW63LNMVXHIX3JMTHAAVM2TU.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/osm2pgsql/repo-discussions/2075</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/discussions/2075",
"url": "https://github.com/openstreetmap/osm2pgsql/discussions/2075",
"name": "View Discussion"
},
"description": "View this Discussion on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>