Comments (5)
What if you lower work_mem just in the session that is doing the updates?
from osm2pgsql.
What if you lower work_mem just in the session that is doing the updates?
I'm not sure - if there's any sorts or bitmap scans being done, it'll have negative impacts there.
from osm2pgsql.
Do you have a specific use case in mind? e.g. an example command line to use?
There is a proposed change in PostgreSQL to allow the fast update pending list to be set separately from work_mem (https://commitfest.postgresql.org/action/patch_view?id=1536). I tried testing it with various settings that I thought were reasonable, but I couldn't find meaningful improvement, because it seems like the pending list wasn't much of a bottleneck.
But I only tried initial loads, not incremental loads, because that is what I am familiar with.
from osm2pgsql.
Do you have a specific use case in mind?
The current reason we can't use fastupdate is that with the high work_mem required on a rendering server the pending-entry list grows very large, and updates become extremely slow because scanning a 128MB pending-entry list is slow.
Ideally, we'd keep the pending list small, and after an osm2pgsql command has completed, force it to process the pending list, even if it's small.
This won't impact imports at all, because the GIN index isn't created until the very end and no updates occur to that table after the index is created. That column also isn't used in importing at all, just populated.
e.g. an example command line to use?
Just normal slim mode updates.
from osm2pgsql.
Ideally, we'd keep the pending list small, and after an osm2pgsql command has completed, force it to process the pending list, even if it's small.
And with 9.6 we will have a way to do this!
My thoughts are
- Detect PostgreSQL version
- On 9.6 create GIN indexes with fastupdate on
- On 9.6 when finishing processing during updates run gin_clean_pending_list
If running on a DB created by an earlier osm2pgsql version (with fastupdate=off indexes) this would still work because gin_clean_pending_list can still be safely called.
The migration is also easy.
from osm2pgsql.
Related Issues (20)
- Problem with query to get changed parent objects HOT 7
- 1.9.2 failed to build on several architectures (error: static assertion failed) HOT 2
- Segmentation fault (core dumped) HOT 2
- Allow more than 32 generalization jobs HOT 2
- Chunky rivers when generalizing water areas HOT 2
- Question: could not extend file "base/361191441/368615606.137": No space left on device
- osm2pgsql should not perform analyze by itself HOT 15
- `object:as_multipolygon()` does not take `object.members` into account. HOT 2
- Some research on middle performance HOT 4
- highway=rest_area treatet as line HOT 2
- free(): invalid size Aborted Core dumped HOT 4
- North America import fails HOT 1
- nlohmann-json is missing from the Alpine build dependencies command
- Error in reprocessing of ways in relation, if osmc_symbols-tag of the relation contains the word 'backslash' HOT 6
- Deprecating -i,--tablespace-index? HOT 5
- Out of bounds tile coordinates produced HOT 3
- as_linestring() and likely other geometry transform functions can only be called from the process_way() function, not custom functions. HOT 5
- When Planet osm data import, way showing 0 and not started HOT 6
- osm2pgsql using too much memory for expire lists HOT 14
- Windows CI broken HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osm2pgsql.