X-Original-To: pgsql-ports-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2E2E252A37 for ; Wed, 3 Aug 2005 21:04:14 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34366-07 for ; Thu, 4 Aug 2005 00:03:54 +0000 (GMT) Received: from pravda.gedanken.org (adsl-63-204-157-24.dsl.snfc21.pacbell.net [63.204.157.24]) by svr1.postgresql.org (Postfix) with ESMTP id 17D6F52A01 for ; Wed, 3 Aug 2005 21:03:53 -0300 (ADT) Received: from pravda.gedanken.org (localhost [127.0.0.1]) by pravda.gedanken.org (8.13.1+Sun/8.13.1) with ESMTP id j7403um0006515 for ; Wed, 3 Aug 2005 17:03:56 -0700 (PDT) Received: (from logan@localhost) by pravda.gedanken.org (8.13.1+Sun/8.13.1/Submit) id j7403uP9006514 for pgsql-ports@postgresql.org; Wed, 3 Aug 2005 17:03:56 -0700 (PDT) X-Authentication-Warning: pravda.gedanken.org: logan set sender to logan@gedanken.org using -f Date: Wed, 3 Aug 2005 17:03:56 -0700 From: "Logan O'Sullivan Bruns" To: pgsql-ports@postgresql.org Subject: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST Message-ID: <20050804000356.GL5788@pravda.gedanken.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200508/2 X-Sequence-Number: 2177 Hello everyone, I ran into a minor bug with PostgreSQL 8.0.3 compiled with xlc on AIX 5.1 (5100-04). Basically it worked fine connecting via unix domain sockets but when you connected to it using TCP/IP with JDBC the child process would SEGV. I tracked the problem to a call to getaddrinfo while evaluating the host based access control rules. The code in function parse_hba on line 752 of hba.c sets the ai_flags member of the addrinfo struct to AI_NUMERICHOST. This is eventually passed into a call to getaddrinfo that results in the SEGV. The manual page from the box implies that at least this version of AIX does not the AI_NUMERICHOST flag. (As opposed to, say, Solaris which clearly does.) Ifdefing the code so that ai_flags is set to zero on AIX fixes the problem. Anyway, I hope this is helpful to someone or the right place to send such notes. Please let me know if you need any additional information. Thanks, logan