<p>I did some testing with a smaller osm.pbf and the PostGres default max_connections of 100 on a many cores processor.<br>
osm2pgsql always fails if option --number-processes is greater than 12.</p>
<p><code>Osm2pgsql failed due to ERROR: Connection to database failed: FATAL: remaining connection slots are reserved for non-replication superuser connections</code></p>
<p>osm2pgsql version 0.94.0 (64 bit id space)</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/885?email_source=notifications&email_token=AA6353UIGBH4MK53AYH6DHTQMRAZ5A5CNFSM4GJDML62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEADYDBI#issuecomment-537362821">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353QYXXWB2LVND7AOOZ3QMRAZ5ANCNFSM4GJDML6Q">mute the thread</a>.<img src="https://github.com/notifications/beacon/AA6353X5IX6KSIS3APKQMV3QMRAZ5A5CNFSM4GJDML62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEADYDBI.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/885?email_source=notifications\u0026email_token=AA6353UIGBH4MK53AYH6DHTQMRAZ5A5CNFSM4GJDML62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEADYDBI#issuecomment-537362821",
"url": "https://github.com/openstreetmap/osm2pgsql/issues/885?email_source=notifications\u0026email_token=AA6353UIGBH4MK53AYH6DHTQMRAZ5A5CNFSM4GJDML62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEADYDBI#issuecomment-537362821",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>