-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: PG 15 - pq: current transaction is aborted, commands ignored until end of transaction block #288
Comments
What's the first error message in the PostgreSQL log? |
2023-02-22 00:01:41.491 UTC [165970] osm@osm ERROR: duplicate key value violates unique constraint "osm_route_member_network_ref_idx"
2023-02-22 00:01:41.491 UTC [165970] osm@osm DETAIL: Key (member, network, ref)=(545593089, US:I, 75) already exists.
2023-02-22 00:01:41.491 UTC [165970] osm@osm STATEMENT: INSERT INTO "public"."osm_route_member" ("osm_id", "member", "role", "type", "ref", "network", "name", "osmc_symbol", "colour") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
2023-02-22 00:01:41.491 UTC [165970] osm@osm ERROR: current transaction is aborted, commands ignored until end of transaction block
2023-02-22 00:01:41.491 UTC [165970] osm@osm STATEMENT: INSERT INTO "public"."osm_route_member" ("osm_id", "member", "role", "type", "ref", "network", "name", "osmc_symbol", "colour") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
2023-02-22 00:01:41.491 UTC [165970] osm@osm ERROR: current transaction is aborted, commands ignored until end of transaction block
2023-02-22 00:01:41.491 UTC [165970] osm@osm STATEMENT: INSERT INTO "public"."osm_route_member" ("osm_id", "member", "role", "type", "ref", "network", "name", "osmc_symbol", "colour") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
2023-02-22 00:01:41.491 UTC [165970] osm@osm ERROR: current transaction is aborted, commands ignored until end of transaction block
2023-02-22 00:01:41.491 UTC [165970] osm@osm STATEMENT: INSERT INTO "public"."osm_route_member" ("osm_id", "member", "role", "type", "ref", "network", "name", "osmc_symbol", "colour") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) |
Can you provide your mapping file? It looks like there's a primary key that makes no sense |
Some more details here for context. We are using docker images from https://github.com/openmaptiles/openmaptiles-tools/tree/v7.0.0 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES This is using the following mapping file:
|
I don't see anything that would cause the |
Oh that's a good lead. Found the source of that index here: openmaptiles/openmaptiles@bc9bbd2 I will give it a quick test by specifically pulling openmaptiles tag v3.14 which doesn't have this index. Question to resolve this, should the imposm config definition be updated to include this index? Or is the index incorrect and I should open an issue on the openmaptiles repo to remove/resolve? We are generating/populating the database with osm data by roughly performing the following: IMPORT_AREA=florida
git clone https://github.com/openmaptiles/openmaptiles
cd openmaptiles/
make
make import-data
make download area=${IMPORT_AREA}
make import-osm area=${IMPORT_AREA}
make import-wikidata area=${IMPORT_AREA}
make import-sql area=${IMPORT_AREA} |
Looks like you did a different set of commands then you documented in the first post and all the issues are outside imposm, so this can be closed. |
Question to resolve this, should the imposm config definition be updated to be aware of / include this index? Or is the index incorrect and I should open an issue on the openmaptiles repo to remove/resolve? These are additional indexes that openmaptile creates to index searches, but unsure if that is supposed to be replicated into the imposm config, or if this is an issue with the openmaptile index? |
I suspect a usage error, but if there is an error, it's in the openmaptiles code. Regardless, it doesn't appear to be an imposm error. |
@pnorman can you elaborate on this? I added the offending index so I'd like to understand what I need to fix. |
|
This issue should be fixed by openmaptiles/openmaptiles#1501. |
Quick note, we are glad to jump in and contribute patches/fixes, but need a little bit of direction for this to get a grasp on "where to start". Thanks!
Context
All SQL commands attempted by imposm fail (on postgres 15) with the following "SQL Error: pq: current transaction is aborted, commands ignored until end of transaction block in query"
Example of log below, and all following commands also show errors. For each update, the following error shows ~10,000+ times.
Possible Fix
A couple of theories are a default/settings change for handling of transactions in postgresql 15, or a specific start/end transaction command being triggered by imposm, or maybe a postgis version incompatibility.
Steps to Reproduce
imposm run -connection postgis://user:pass@serverip:5432/osm -mapping /mapping/mapping.yaml -cachedir /cache -diffdir /import -expiretiles-dir /import -expiretiles-zoom 14 -config data/florida.repl.json
Context
Imposm updates are not working
Your Environment
Ubuntu 22
imposm version 0.11.1
Postgresql 15.2-1.pgdg22.04+1
Postgis 3.3.2
The text was updated successfully, but these errors were encountered: