By the way, the successful Europe extract import of an almost 20GB PBF I mentioned on the 11,5 GB RAM Virtualbox Ubuntu 18.04 instance, was with the following “postgresql.conf” settings:
- shared_buffers = 4000MB
- work_mem = 800MB
- maintenance_work_mem = 2000MB
- effective_io_concurrency = 200 (as this is on SSD!)
- max_worker_processes / max_parallel_workers_per_gatherer / max_parallel_maintenace_workers / max_parallel_workers = 4
Of course, since you have almost triple the amount of RAM available at 32 GB, doubling or tripling the figures related to memory should be relatively safe, although you must factor in your larger number of cores (6 versus the 4 I had available) as well for the memory settings, so doubling the figures may be safer assuming you set the parallel workers related settings to 6.
And as said dozens of GB of Ubuntu swap space set in Ubuntu itself (although I must admit I haven’t seen the usage of the swap space rise above 6 GB or so during the import the few times I checked, for planet though, you should definitely factor in swap space on SSD in appropriate amounts on low RAM machines).
And for the command line as mentioned in the previous post “-C 1500” and --slim, --drop and --flat_nodes used, pretty much as in the first post here by EricG97477.