From Jan.van.der.Weijde@attachmate.com Wed Sep 20 12:38:55 2006 X-Original-To: pgsql-interfaces-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 0CE1D9FA1AF for ; Wed, 20 Sep 2006 09:38:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 52064-01 for ; Wed, 20 Sep 2006 12:38:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from Exch-Sea0.attachmate.com (automail.attachmate.com [150.215.8.31]) by postgresql.org (Postfix) with ESMTP id 305BB9FB354 for ; Wed, 20 Sep 2006 09:38:30 -0300 (ADT) Received: from exch-sea1.attachmate.com ([150.215.8.16]) by Exch-Sea0.attachmate.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 20 Sep 2006 05:38:28 -0700 Received: from exch-shan1.attachmate.com ([149.82.99.9]) by exch-sea1.attachmate.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 20 Sep 2006 05:38:27 -0700 Received: from exch-lei1.attachmate.com ([150.215.225.5]) by exch-shan1.attachmate.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 20 Sep 2006 13:38:24 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6DCB1.A97E1DCC" Subject: PQsetdbLogin() and PQconnectdb() fail on HPUX11i 64 bits with empty servername Date: Wed, 20 Sep 2006 14:38:23 +0200 Message-ID: <4B9C73D1EB78FE4A81475AE8A553B3C6078025@exch-lei1.attachmate.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: PQsetdbLogin() and PQconnectdb() fail on HPUX11i 64 bits with empty servername Thread-Index: AcbcsanJ3YGhw5jPQnWeMh9EtMFGtA== From: "Jan van der Weijde" To: X-OriginalArrivalTime: 20 Sep 2006 12:38:24.0693 (UTC) FILETIME=[AA0CDE50:01C6DCB1] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200609/22 X-Sequence-Number: 6267 This is a multi-part message in MIME format. ------_=_NextPart_001_01C6DCB1.A97E1DCC Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello all, =20 I'm using PQsetdbLogin() or PQconnectdb() to connect to a local server on an 64bits HP system with O/S HPUX11i. The PostgreSQL version is 8.1.4 According to the documentation I can leave out the host specification: =20 host: Name of host to connect to. If this begins with a slash, it specifies Unix-domain communication rather than TCP/IP communication; the value is the name of the directory in which the socket file is stored. The default behavior when host is not specified is to connect to a Unix-domain socket in /tmp (or whatever socket directory was specified when PostgreSQL was built). On machines without Unix-domain sockets, the default is to connect to localhost.=20 =20 However when I do that, the client givers error message: =20 could not connect to server: Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? =20 while the postmaster server log the first time: LOG: getsockname() failed: Invalid argument and any subsequent time:=20 LOG: incomplete startup packet =20 No other socket location was specified when PostgreSQL was built, so both the client and the server should use /tmp =20 When I compile the client API as 32 bits code, the error does not occur. When I do specify localhost or an actual server name both connect functions succeed. =20 Can anyone help me?=20 =20 Thank you, Jan van der Weijde =20 =20 ------_=_NextPart_001_01C6DCB1.A97E1DCC Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hello all,
 
I'm using PQsetdbLogin() or PQconnectdb() to connect to = a local=20 server on an 64bits HP system with O/S HPUX11i. The PostgreSQL version=20 is 8.1.4
According to the documentation I can leave = out the host=20 specification:
 
host:
Name of = host to=20 connect to. If=20 this begins with a slash, it specifies Unix-domain communication rather = than=20 TCP/IP communication; the value is the name of the directory in which = the socket=20 file is stored. The default behavior when host is not = specified is to=20 connect to a Unix-domain socket in /tmp (or whatever socket directory was specified = when PostgreSQL was built). On machines without = Unix-domain=20 sockets, the default is to connect to localhost.=20
 
However when I do that, the client givers = error=20 message:
 
could not connect to server:
Is the = server=20 running locally and accepting
connections on Unix domain socket=20 "/tmp/.s.PGSQL.5432"?
 
while the postmaster server log the first=20 time:
LOG: =20 getsockname() failed: Invalid argument
and any subsequent=20 time: 
LOG: =20 incomplete startup packet
 
No other socket location was specified when = PostgreSQL was=20 built, so both the client and the server should use=20 /tmp
 
When I compile the client API as 32 bits code, the = error does=20 not occur.
When I do specify localhost or an actual server = name=20  both connect functions succeed.
 
Can anyone help me? =
 
Thank you,
Jan van der = Weijde
 
 
------_=_NextPart_001_01C6DCB1.A97E1DCC-- From tgl@sss.pgh.pa.us Sat Sep 23 18:54:17 2006 Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 0D8DC9FA6B2 for ; Sat, 23 Sep 2006 15:54:17 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 22962-02 for ; Sat, 23 Sep 2006 18:54:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A1BDD9FA666 for ; Sat, 23 Sep 2006 15:54:06 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k8NIrwrr027210; Sat, 23 Sep 2006 14:53:58 -0400 (EDT) To: "Jan van der Weijde" cc: pgsql-interfaces@postgresql.org Subject: Re: PQsetdbLogin() and PQconnectdb() fail on HPUX11i 64 bits with empty servername In-reply-to: <4B9C73D1EB78FE4A81475AE8A553B3C6078025@exch-lei1.attachmate.com> References: <4B9C73D1EB78FE4A81475AE8A553B3C6078025@exch-lei1.attachmate.com> Comments: In-reply-to "Jan van der Weijde" message dated "Wed, 20 Sep 2006 14:38:23 +0200" Date: Sat, 23 Sep 2006 14:53:58 -0400 Message-ID: <27209.1159037638@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200609/24 X-Sequence-Number: 6269 "Jan van der Weijde" writes: > I'm using PQsetdbLogin() or PQconnectdb() to connect to a local server > on an 64bits HP system with O/S HPUX11i. The PostgreSQL version is 8.1.4 > ... > When I compile the client API as 32 bits code, the error does not occur. > When I do specify localhost or an actual server name both connect > functions succeed. What exactly do you mean by "HPUX11i" --- it's not even clear whether you are talking about a PA-RISC or an Intel platform here? What compiler are you using, and with what options? (The output of pg_config would be helpful.) FWIW, I checked PG 8.1 before release on 11.23, PA-RISC and IA64 both, and it passed regression tests in 64-bit builds, so it's not completely broken on that platform. The regression tests do use local connections by default. regards, tom lane From tgl@sss.pgh.pa.us Mon Oct 23 22:43:39 2006 Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id AC5109FA469 for ; Mon, 23 Oct 2006 19:43:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 48357-04 for ; Mon, 23 Oct 2006 22:43:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id D43449FA433 for ; Mon, 23 Oct 2006 19:43:28 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k9NMhLuq029555; Mon, 23 Oct 2006 18:43:21 -0400 (EDT) To: "Jan van der Weijde" cc: pgsql-interfaces@postgresql.org Subject: Re: PQsetdbLogin() and PQconnectdb() fail on HPUX11i 64 bits with empty servername In-reply-to: <4B9C73D1EB78FE4A81475AE8A553B3C6078025@exch-lei1.attachmate.com> References: <4B9C73D1EB78FE4A81475AE8A553B3C6078025@exch-lei1.attachmate.com> Comments: In-reply-to "Jan van der Weijde" message dated "Wed, 20 Sep 2006 14:38:23 +0200" Date: Mon, 23 Oct 2006 18:43:21 -0400 Message-ID: <29554.1161643401@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/23 X-Sequence-Number: 6306 "Jan van der Weijde" writes: > I'm using PQsetdbLogin() or PQconnectdb() to connect to a local server > on an 64bits HP system with O/S HPUX11i. The PostgreSQL version is 8.1.4 > According to the documentation I can leave out the host specification: > However when I do that, the client givers error message: > could not connect to server: > Is the server running locally and accepting > connections on Unix domain socket "/tmp/.s.PGSQL.5432"? I tried to reproduce this on HP's testdrive machines, without success: it seems to work fine. "64bits HP system with O/S HPUX11i" is pretty darn vague, considering that HP supports this OS on two different architectures and there are multiple subversions of it, but on the whole I'd bet on a compiler problem. Is your compiler fully up-to-date with HP's patches? regards, tom lane