<p>"unexpected EOF on client connection with an open transaction. could not receive data from client" means that postgres lost contact with the client (osm2pgsql), mostly likely because osm2pgsql died unexpectedly. The further comment "No connection could be made because the target machine actively refused it." sounds bogus to me as there is no way for postgresql to be actively trying to (re)establish a connection. I suspect that the facility to expand an errno to an errstring (which is in the domain of neither postgresql nor osm2pgsql--it is probably in glibc or analogous library) is doing something bad on Windows. In other words, ignore the "actively refused" part, it is not useful to your debugging efforts.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href='https://github.com/openstreetmap/osm2pgsql/issues/117#issuecomment-33416105'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/4046574__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwNjM4NjIyNywiZGF0YSI6eyJpZCI6MjQxMTIxNDJ9fQ==--b1cd16ddad610d171e6cb9a2922d52a2f9c1291c.gif' height='1' width='1'></p>