Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T58PH-0003mf-Vd for pgsql-bugs@postgresql.org; Sat, 25 Aug 2012 04:55:36 +0000 Received: from smtprelay0130.b.hostedemail.com ([64.98.42.130] helo=smtprelay.b.hostedemail.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T58PB-0005uv-Pl for pgsql-bugs@postgresql.org; Sat, 25 Aug 2012 04:55:35 +0000 Received: from filter.hostedemail.com (b-bigip1 [10.5.19.254]) by smtprelay02.b.hostedemail.com (Postfix) with SMTP id 13C5519A5B3; Sat, 25 Aug 2012 04:55:28 +0000 (UTC) X-Panda: scanned! X-Spam-Summary: 50, 0, 0, , d41d8cd98f00b204, alvherre@alvh.no-ip.org, :::::::, RULES_HIT:152:355:379:599:601:945:967:973:988:989:1260:1277:1311:1313:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2525:2560:2563:2682:2685:2857:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3027:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3869:3870:3872:3873:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4605:4659:5007:6261:7679:8957:9025:9121:10004:10400:10471:10848:10967:11256:11257:11638:11639:11658:11914:12517:12519, 0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none, DomainCache:0, MSF:not bulk, SPF:fn, MSBL:0, DNSBL:none, Custom_rules:0:0:0 X-Session-Marker: 616C76686572726540616C76682E6E6F2D69702E6F7267 X-Filterd-Recvd-Size: 2707 Received: from perhan.alvh.no-ip.org (unknown [200.85.215.105]) (Authenticated sender: alvherre@alvh.no-ip.org) by omf05.b.hostedemail.com (Postfix) with ESMTPA; Sat, 25 Aug 2012 04:55:27 +0000 (UTC) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 8448B6E451; Sat, 25 Aug 2012 00:55:22 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: Tom Lane , Luke Koops , Pg Bugs Subject: Re: BUG #4958: Stats collector hung on WaitForMultipleObjectsEx while attempting to recv a datagram From: Alvaro Herrera To: Robert Haas In-reply-to: References: <200907311459.n6VExuSa036743@wwwmaster.postgresql.org> <1410.1344363743@sss.pgh.pa.us> <1345576064-sup-7145@alvh.no-ip.org> <9323.1345581034@sss.pgh.pa.us> <28583.1345688651@sss.pgh.pa.us> Date: Sat, 25 Aug 2012 00:55:22 -0400 Message-Id: <1345870202-sup-3003@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/191 X-Sequence-Number: 33915 Excerpts from Robert Haas's message of s=C3=A1b ago 25 00:10:57 -0400 201= 2: > > It looks sane to me in a quick once-over (bearing in mind I can't tes= t > > it). What's bothering you about the ereport calls? >=20 > Well, 9.1 currently has: >=20 > errmsg_internal("failed to enumerate network events: %i", (int) GetLast= Error())) >=20 > Prior to your patch, master had: >=20 > errmsg_internal("failed to enumerate network events: error code %lu", > GetLastError()) >=20 > And you changed it to: >=20 > elog(ERROR, "failed to enumerate network events: error code %u", > WSAGetLastError()) >=20 > So obviously there's a conflict there. In the previously-posted > version, I chose to just take your version, but I'm not sure whether > it would be better -- in the back branches -- to simply replace > GetLastError() with WSAGetLastError() and leave it alone otherwise. Note that for translations none of this matters, because errmsg_internal() does not mark its argument for translation, and neither does elog(). The change of %i to "error code %lu" was done recently (during 9.2 devel cycle) to make all error messages involving GetLastError() consistent; see commit 1af55e275. --=20 =C3=81lvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services