On 2020-07-01 1:42 p.m., Frederik Ramm wrote:
+ I have seen a couple of different postgresql config suggestions. Is
there a one-size fits all or should I tailor it more to my server's
configuration.
Most configs you see will be for earlier Postgres versions and hence not
necessarily valid for Pg 12. Switching off everything that has to do
with "safe writing", e.g. fsync, certainly makes sense (you have to
restart the import anyway if you suffer from power failure mid-way, no
use in setting up Postgres to avoid data loss when writing).


The two settings you should adjust are work_mem and maintenance_work_mem.

In general, work_mem=128GB is good with most styles. I haven't experiment with more. If you have the RAM, maintenance_work_mem=4GB would be plenty.

Do not adjust synchronous_commit. osm2pgsql turns it off for the import, and this will override your setting.

Do not adjust fsync. synchronous_commit gets you the performance gains.

You may want to increase checkpoint_timeout and checkpoint_completion_target, but these offer minor gains at mosts.

_______________________________________________
talk mailing list
talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk

Reply via email to