<p>I broke out gdb and stepped through to see what IDs output_multi_t::enqueue_ways is called with</p>
<p>When working as expected, they are<br>
127018391<br>
312476311<br>
9223372036854775807 (= 2^63 - 1)</p>
<p>When not working, they are<br>
85486005<br>
127018391<br>
9223372036854775807 (= 2^63 - 1)</p>
<p>The max signed signed bigint is coming from <a href="https://github.com/openstreetmap/osm2pgsql/blob/c3d17f4ca13fbfa036b9b0c033b1c08b16bc6bf4/middle-pgsql.cpp#L588">https://github.com/openstreetmap/osm2pgsql/blob/c3d17f4ca13fbfa036b9b0c033b1c08b16bc6bf4/middle-pgsql.cpp#L588</a>. Both pending lists look correct as passed <em>into</em> the function.</p>
<p>When working as expected with the building the following are calls to job_queue</p>
<p><code>output-multi.cpp:89</code> <code>job_queue.push(pending_job_t(127018391, 0));</code><br>
<code>output-multi.cpp:110</code> <code>job_queue.push(pending_job_t(127018391, 0));</code></p>
<p>And the job_queue is std::stack wrapping: std::deque with 2 elements = {{osm_id = 127018391, output_id = 0}, {osm_id = 127018391, output_id = 0}}. So there's two of the building.</p>
<p>When not working, no job_queue push calls are made with the building.</p>
<p>Looking through the differences between <code>output_pgsql_t::enqueue_ways</code> and <code>output_multi_t::enqueue_ways</code> I see that the last condition is <code>==</code> for multi and <code>></code> for pgsql. Changing that, both job queues have the one occurrence of the building, and the output checks out.</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/735#issuecomment-293688924">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AD2-7n_uaByPfGcHC8Kb011QvQTUbtUeks5rvSvFgaJpZM4M2YeK">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AD2-7tL0iVokoU0ydG_aqZCkylH8LmvFks5rvSvFgaJpZM4M2YeK.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/openstreetmap/osm2pgsql/issues/735#issuecomment-293688924"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>
<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://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/osm2pgsql"}},"updates":{"snippets":[{"icon":"PERSON","message":"@pnorman in #735: I broke out gdb and stepped through to see what IDs output_multi_t::enqueue_ways is called with\r\n\r\nWhen working as expected, they are\r\n127018391\r\n312476311\r\n9223372036854775807 (= 2^63 - 1)\r\n\r\nWhen not working, they are\r\n85486005\r\n127018391\r\n9223372036854775807 (= 2^63 - 1)\r\n\r\nThe max signed signed bigint is coming from https://github.com/openstreetmap/osm2pgsql/blob/c3d17f4ca13fbfa036b9b0c033b1c08b16bc6bf4/middle-pgsql.cpp#L588. Both pending lists look correct as passed *into* the function.\r\n\r\nWhen working as expected with the building the following are calls to job_queue\r\n\r\n`output-multi.cpp:89` `job_queue.push(pending_job_t(127018391, 0));`\r\n`output-multi.cpp:110` `job_queue.push(pending_job_t(127018391, 0));`\r\n\r\nAnd the job_queue is std::stack wrapping: std::deque with 2 elements = {{osm_id = 127018391, output_id = 0}, {osm_id = 127018391, output_id = 0}}. So there's two of the building.\r\n\r\nWhen not working, no job_queue push calls are made with the building.\r\n\r\nLooking through the differences between `output_pgsql_t::enqueue_ways` and `output_multi_t::enqueue_ways` I see that the last condition is `==` for multi and `\u003e` for pgsql. Changing that, both job queues have the one occurrence of the building, and the output checks out."}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/osm2pgsql/issues/735#issuecomment-293688924"}}}</script>