<p>After upgrade to 18.04 from 14.04, osm2pgsql had to be recompiled due to broken libraries. Before I was able to use -C 16000 and it never used more than 24 GB of Ram. Today I ran exactly same parameters  and I see these situation:</p>
<pre><code> 6426 postgres  20   0  0.132t 0.072t   3172 D   7.3 78.7  45:31.48 osm2pgsql --append --style /usr/local/share/osm2pgsql/default.style -k --flat-+
</code></pre>
<p>I could definitely say that postgresql didn't change and work as before 9.1 and I don't see any tile generation degradation.</p>
<p>The full line is here command <a href="https://github.com/osmandapp/OsmAnd-misc/blob/master/config/mapnik_update.sh#L13">https://github.com/osmandapp/OsmAnd-misc/blob/master/config/mapnik_update.sh#L13</a></p>
<p>If you can tell what information is possible to provide that would be great. I'm afrad reimport will not solve the problem cause the changeset diff I'm trying to load is just 3 MB.</p>
<p>The biggest mystery that RAM is 4 times more than expected.</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/846#issuecomment-404971550">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AD2-7oW17BA6wnxMNqFTj1-EauYq6gSNks5uGSJUgaJpZM4TsRyn">mute the thread</a>.<img src="https://github.com/notifications/beacon/AD2-7rbNOPY2wf4JPlYSulasdU4HgOznks5uGSJUgaJpZM4TsRyn.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/osm2pgsql","title":"openstreetmap/osm2pgsql","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/osm2pgsql"}},"updates":{"snippets":[{"icon":"PERSON","message":"@vshcherb in #846: After upgrade to 18.04 from 14.04, osm2pgsql had to be recompiled due to broken libraries. Before I was able to use -C 16000 and it never used more than 24 GB of Ram. Today I ran exactly same parameters  and I see these situation:\r\n```\r\n 6426 postgres  20   0  0.132t 0.072t   3172 D   7.3 78.7  45:31.48 osm2pgsql --append --style /usr/local/share/osm2pgsql/default.style -k --flat-+\r\n```\r\nI could definitely say that postgresql didn't change and work as before 9.1 and I don't see any tile generation degradation.\r\n\r\nThe full line is here command https://github.com/osmandapp/OsmAnd-misc/blob/master/config/mapnik_update.sh#L13\r\n\r\nIf you can tell what information is possible to provide that would be great. I'm afrad reimport will not solve the problem cause the changeset diff I'm trying to load is just 3 MB.\r\n\r\nThe biggest mystery that RAM is 4 times more than expected."}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/osm2pgsql/issues/846#issuecomment-404971550"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/issues/846#issuecomment-404971550",
"url": "https://github.com/openstreetmap/osm2pgsql/issues/846#issuecomment-404971550",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [openstreetmap/osm2pgsql] COPY_END for planet_osm_polygon failed: ERROR:  out of memory (#846)",
"sections": [
{
"text": "",
"activityTitle": "**vshcherb**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@vshcherb",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"openstreetmap/osm2pgsql\",\n\"issueId\": 846,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/osm2pgsql/issues/846#issuecomment-404971550"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 330374311\n}"
}
],
"themeColor": "26292E"
}
]</script>