Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id E3F5E64FCF9 for ; Tue, 16 Sep 2008 03:32:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 54730-01 for ; Tue, 16 Sep 2008 03:32:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from postrelay.edis.at (postrelay.edis.at [81.223.48.30]) by postgresql.org (Postfix) with ESMTP id 58F3A64FCEA for ; Tue, 16 Sep 2008 03:32:23 -0300 (ADT) Received: from mailrelay.edis.at (postrelay [81.223.48.30]) by postrelay.edis.at (Postfix) with ESMTP id B395B4017B9F for ; Tue, 16 Sep 2008 08:32:21 +0200 (CEST) Received: from localhost.localdomain ([::ffff:91.83.10.224]) (AUTH: CRAM-MD5 zb@cybertec.at, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by mailrelay.edis.at with esmtp; Tue, 16 Sep 2008 08:32:21 +0200 id 0000000016007A87.0000000048CF52F5.000051A7 Message-ID: <48CF52F4.6040206@cybertec.at> Date: Tue, 16 Sep 2008 08:32:20 +0200 From: Zoltan Boszormenyi User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org CC: Tom Lane Subject: psqlODBC and IPv6 X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/9 X-Sequence-Number: 9602 Hi, does anyone know why 08.03.0200 fixed connecting to a server via an IPv6 socket? 08.03.0100 is in Fedora 9 and connection is very unreliable: https://bugzilla.redhat.com/show_bug.cgi?id=462312 The diff between .0100 and .0200 reveals only a thinko fix in socket.c: ======================================= @@ -472,7 +485,7 @@ static int SOCK_wait_for_ready(SocketCla tm.tv_sec = retry_count; tm.tv_usec = 0; } - ret = select((int) socket + 1, output ? NULL : &fds, output ? &fds : NULL, &except_fds, no_timeout ? NULL : &tm); + ret = select((int) sock->socket + 1, output ? NULL : &fds, output ? &fds : NULL, &except_fds, no_timeout ? NULL : &tm); gerrno = SOCK_ERRNO; } while (ret < 0 && EINTR == gerrno); if (retry_count < 0) ======================================= There's no "socket" variable around there or even declared globally, only the address of socket(2) function. But why would this "select (address + 1, ...)" which is most likely larger than the number of open files cause protocol errors in IPv6 but not in IPv4? There seems to be no IPv6 specific in the changes between 08.03.0100 and .0200. Thanks in advance, Zoltán Böszörményi -- ---------------------------------- Zoltán Böszörményi Cybertec Schönig & Schönig GmbH http://www.postgresql.at/