<p>--slim is required for flat-nodes per <a href="https://wiki.openstreetmap.org/wiki/Osm2pgsql" rel="nofollow">the Wiki</a>.</p>
<p>I see you've changed <code>checkpoint_completion_target</code> up (good), I would also increase <code>checkpoint_timeout</code> from default of 5min to a much higher value.  For long running loads I set to <code>1d</code>, the max it will allow.</p>
<p>Are you using osm2pgsql v1.0 or an older version?  If it's an older version I'd throw in <code>--unlogged</code> too, but that parameter is gone in 1.0.  If you're using 1.0 <code>--drop</code> alone enables the same behavior.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/issues/962?email_source=notifications&email_token=AA6353XBCSMOZCEG7DNHGJLQPCDSHA5CNFSM4JB3RZC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBQTW6A#issuecomment-543243128">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353R5P4K42XBD4DNDJY3QPCDSHANCNFSM4JB3RZCQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AA6353QM6UYEGDPUNON4HZDQPCDSHA5CNFSM4JB3RZC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBQTW6A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/issues/962?email_source=notifications\u0026email_token=AA6353XBCSMOZCEG7DNHGJLQPCDSHA5CNFSM4JB3RZC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBQTW6A#issuecomment-543243128",
"url": "https://github.com/openstreetmap/osm2pgsql/issues/962?email_source=notifications\u0026email_token=AA6353XBCSMOZCEG7DNHGJLQPCDSHA5CNFSM4JB3RZC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBQTW6A#issuecomment-543243128",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>