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

Append mode isn't supported #24

Closed
rustprooflabs opened this issue Dec 7, 2022 · 2 comments
Closed

Append mode isn't supported #24

rustprooflabs opened this issue Dec 7, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@rustprooflabs
Copy link
Owner

rustprooflabs commented Dec 7, 2022

Details

This issue was discovered while investigating rustprooflabs/pgosm-flex#275.

Example

curl "https://osm2pgsql-tuner.com/api/v1?system_ram_gb=8&osm_pbf_gb=0.203&append=True&pbf_filename=colorado-latest&pgosm_layer_set=run"

Returns the following. I expected cmd to have --append, but it does not.

{
  "osm2pgsql": {
    "cmd": "osm2pgsql -d $PGOSM_CONN  --cache=1157  --slim  --output=flex --style=./run.lua  ~/pgosm-data/colorado-latest.osm.pbf", 
    "decisions": [
      {
        "desc": "Using --append, cannot use --drop", 
        "name": "Using Append", 
        "option": "--drop"
      }, 
      {
        "desc": "No reason to use --flat-nodes", 
        "name": "Not using", 
        "option": "--flat-node"
      }, 
      {
        "desc": "Set --cache to expected requirement for given PBF size.", 
        "name": "Sufficient RAM", 
        "option": "--cache"
      }
    ], 
    "osm2pgsql_append": true, 
    "osm2pgsql_cache_max": 5.28, 
    "osm2pgsql_drop": false, 
    "osm2pgsql_flat_nodes": false, 
    "osm2pgsql_limited_ram": false, 
    "osm2pgsql_noslim_cache": 1.5075, 
    "osm2pgsql_run_in_ram": false, 
    "osm2pgsql_slim_cache": 1.130625, 
    "system_ram_gb": 8.0
  }
}
@rustprooflabs rustprooflabs added the bug Something isn't working label Dec 7, 2022
@rustprooflabs rustprooflabs added this to the 0.0.6 milestone Dec 7, 2022
@rustprooflabs
Copy link
Owner Author

Aha - I had forgotten that during the first run of osm2pgsql when you want to be able to use --append later, you need to just run with --slim without --drop. Later runs of osm2pgsql you use --append. It seems the tuner should require a second parameter for 1st run vs. 2nd run, b/c the 2nd (and later) run needs --append.

Add first-run parameter? Then it's only needed the first time, making subsequent runs able to use the simpler command. I think subsequent runs will outnumber 1st runs by a decent margin.

I verified that running osm2pgsql with --append on an empty database fails.

@rustprooflabs
Copy link
Owner Author

This has been resolved for quite a few months now. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant