<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 2020-07-01 1:42 p.m., Frederik Ramm
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:e6b7c11a-c832-5a37-556a-839bfe65b847@remote.org">
<blockquote type="cite" style="color: #000000;">
<pre class="moz-quote-pre" wrap="">+ 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.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">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).</pre>
</blockquote>
<p><br>
</p>
<p>The two settings you should adjust are work_mem and
maintenance_work_mem.</p>
<p>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.</p>
<p>Do not adjust synchronous_commit. osm2pgsql turns it off for the
import, and this will override your setting.</p>
<p>Do not adjust fsync. synchronous_commit gets you the performance
gains.</p>
<p>You may want to increase checkpoint_timeout and
checkpoint_completion_target, but these offer minor gains at
mosts.<br>
</p>
<p>
</p>
</body>
</html>