Skip site navigation (1) Skip section navigation (2)

Re: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST

From: "Mohan, Ross" <RMohan(at)arbinet(dot)com>
To: <pgsql-ports(at)postgresql(dot)org>
Subject: Re: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST
Date: 2005-08-08 14:20:24
Message-ID: CC74E7E10A8A054798B6611BD1FEF4D30796711C@vamail01.thexchange.com (view raw or flat)
Thread:
Lists: pgsql-ports
Wow, nice catch, nice analysis. Checking now whether my AIX5.2/3 boxes
set this correctly. 
				

-----Original Message-----
From: pgsql-ports-owner(at)postgresql(dot)org [mailto:pgsql-ports-owner(at)postgresql(dot)org] On Behalf Of Logan O'Sullivan Bruns
Sent: Wednesday, August 03, 2005 8:04 PM
To: pgsql-ports(at)postgresql(dot)org
Subject: [PORTS] PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST


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


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

pgsql-ports by date

Next:From: Mohan, RossDate: 2005-08-08 18:30:01
Subject: Re: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST
Previous:From: Logan O'Sullivan BrunsDate: 2005-08-04 00:03:56
Subject: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group