Skip to content

Fix a bug in diff expire handling#2492

Merged
lonvia merged 1 commit into
osm2pgsql-dev:masterfrom
joto:fix-expire
Jul 3, 2026
Merged

Fix a bug in diff expire handling#2492
lonvia merged 1 commit into
osm2pgsql-dev:masterfrom
joto:fix-expire

Conversation

@joto

@joto joto commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

If you have multiple expire outputs on a single geometry column and at least one of them is configured as a diff_expire, osm2pgsql can segfault. This commit fixes that problem.

The problem was that to calculate the diff geometries, the original geometries were destroyed which lead to the segfault when those geometries were accessed again later. Now we make sure to access the original geometries only until we generate the diff geometries and after that only access the diff geometries. As a side effect processing will even be faster if you have several expire configs that use diff processing.

If you have multiple expire outputs on a single geometry column and at
least one of them is configured as a diff_expire, osm2pgsql can
segfault. This commit fixes that problem.

The problem was that to calculate the diff geometries, the original
geometries were destroyed which lead to the segfault when those
geometries were accessed again later. Now we make sure to access the
original geometries only until we generate the diff geometries and after
that only access the diff geometries. As a side effect processing will
even be faster if you have several expire configs that use diff
processing.
@lonvia lonvia merged commit 4caafe6 into osm2pgsql-dev:master Jul 3, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants