Database error: ERROR: cannot execute CREATE FUNCTION in a read-only transaction #2075
-
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.
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 osm2pgsql --create --slim -C 1000 \
--hstore-all \
data.osm.pbf Can anyone provide some assistance? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There is no difference in the code whether you use a small or a large file. And osm2pgsql doesn't do anything with read-only transactions. So, I'd think this must be related to your PostgreSQL database in some way. What's probably casing this is a function we are creating for a database trigger. Did you set up PostgreSQL yourself or are you using the database service from Digital Ocean? Maybe they are doing some kind of auto-scaling and you have a connection going to a read-only replica or so. If you are using that, I suggest contacting their support. |
Beta Was this translation helpful? Give feedback.
There is no difference in the code whether you use a small or a large file. And osm2pgsql doesn't do anything with read-only transactions. So, I'd think this must be related to your PostgreSQL database in some way. What's probably casing this is a function we are creating for a database trigger.
Did you set up PostgreSQL yourself or are you using the database service from Digital Ocean? Maybe they are doing some kind of auto-scaling and you have a connection going to a read-only replica or so. If you are using that, I suggest contacting their support.