Skip to content

Database error: ERROR: cannot execute CREATE FUNCTION in a read-only transaction #2075

Closed Answered by joto
goncalo-oliveira asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@goncalo-oliveira
Comment options

@goncalo-oliveira
Comment options

Answer selected by goncalo-oliveira
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants