Skip to content
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

fix: reverse geocoding data import don't use unlogged tables #15136

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

zackpollard
Copy link
Contributor

@zackpollard zackpollard commented Jan 7, 2025

Using unlogged tables can mean if the database crashes or system hard resets before the database flushes to disk, the data in the unlogged reverse geocoding tables was lost and unrecoverable because there is no WAL. This is also more likely due to the resource intensive nature of the import and indexing process, as well as lots of jobs potentially starting on boot.

Performance implications of this change were minimal on my dev machine, import time changed from 6 seconds to 7 seconds for the rows (excluding indexing time which remained the same).

I also managed to reproduce this problem by force killing the database container straight after the import completed, which resulted in an empty table.

@zackpollard zackpollard merged commit 776be7d into main Jan 7, 2025
39 checks passed
@zackpollard zackpollard deleted the fix/geocoding-empty-tables branch January 7, 2025 15:36
arctic-foxtato pushed a commit to arctic-foxtato/immich that referenced this pull request Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants