Honda Shigehiro has diagnosed the longstanding problems with his Tru64/Alpha buildfarm member (bear). See below.

First, it appears that there is a problem with the system getaddrinfo(), which configure reports as usable, but turns out not to be. Our current configure test checks the return value of getaddrinfo("", "", NULL, NULL) but I am wondering if we should test for "localhost" instead of "" as the first parameter.

Second, it appears that this platform apparently doesn't handle Infinity and NaN well. The regression diffs are attached.

cheers

andrew

-------- Original Message --------
Subject:        Re: postgresql buildfarm member bear
Date:   Tue, 28 Mar 2006 21:53:15 +0900 (JST)
From:   Honda Shigehiro <[EMAIL PROTECTED]>
To:     [EMAIL PROTECTED]
CC:     [EMAIL PROTECTED]
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>




I found the cause. Tru64's getaddrinfo seems something wrong.
(I use version 5.0, but with google search, this is same until version 5.1B.) I had used only with Unix domain socket.

So I succeed to start server with Unix Domain Socket(ex. make check).
But with "listen_addresses = 'localhost'", fail with:
 LOG:  could not translate host name "localhost", service "5432" to address: 
servname not supported for ai_socktype

To solve this, I had change to use src/port/getaddrinfo.c.
(I have little knowledge about autoconf...so ugly...)
Is there smart way which do not need to change code?

(1) change configure script and run it
bash-2.05b$ diff configure.aaa configure
14651c14651
< #define HAVE_GETADDRINFO 1
---
/* #define HAVE_GETADDRINFO 1 */

(2) run make command It fail by some undefined symbol. After the fail, change directory to src/port and type:
cc -std   -I../../src/port  -I../../src/include -I/usr/local/include -c 
getaddrinfo.c -o getaddrinfo.o
ar crs libpgport.a isinf.o getopt_long.o copydir.o dirmod.o exec.o noblock.o 
path.o pipe.o pgsleep.o pgstrcasecmp.o sprompt.o thread.o getaddrinfo.o
ar crs libpgport_srv.a isinf.o getopt_long.o copydir.o dirmod_srv.o exec_srv.o 
noblock.o path.o pipe.o pgsleep.o pgstrcasecmp.o sprompt.o thread_srv.o 
getaddrinfo.o

(3) re-run make command

(4) check make check and make installcheck
float4 and float8 tests are failed in both cases.



*** ./expected/float4.out       Thu Apr  7 10:51:40 2005
--- ./results/float4.out        Tue Mar 28 21:03:10 2006
***************
*** 35,69 ****
  ERROR:  invalid input syntax for type real: "123            5"
  -- special inputs
  SELECT 'NaN'::float4;
!  float4 
! --------
!     NaN
! (1 row)
! 
  SELECT 'nan'::float4;
!  float4 
! --------
!     NaN
! (1 row)
! 
  SELECT '   NAN  '::float4;
!  float4 
! --------
!     NaN
! (1 row)
! 
  SELECT 'infinity'::float4;
!   float4  
! ----------
!  Infinity
! (1 row)
! 
  SELECT '          -INFINiTY   '::float4;
!   float4   
! -----------
!  -Infinity
! (1 row)
! 
  -- bad special inputs
  SELECT 'N A N'::float4;
  ERROR:  invalid input syntax for type real: "N A N"
--- 35,54 ----
  ERROR:  invalid input syntax for type real: "123            5"
  -- special inputs
  SELECT 'NaN'::float4;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT 'nan'::float4;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT '   NAN  '::float4;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT 'infinity'::float4;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT '          -INFINiTY   '::float4;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  -- bad special inputs
  SELECT 'N A N'::float4;
  ERROR:  invalid input syntax for type real: "N A N"
***************
*** 72,90 ****
  SELECT ' INFINITY    x'::float4;
  ERROR:  invalid input syntax for type real: " INFINITY    x"
  SELECT 'Infinity'::float4 + 100.0;
! ERROR:  type "double precision" value out of range: overflow
  SELECT 'Infinity'::float4 / 'Infinity'::float4;
!  ?column? 
! ----------
!       NaN
! (1 row)
! 
  SELECT 'nan'::float4 / 'nan'::float4;
!  ?column? 
! ----------
!       NaN
! (1 row)
! 
  SELECT '' AS five, * FROM FLOAT4_TBL;
   five |     f1      
  ------+-------------
--- 57,70 ----
  SELECT ' INFINITY    x'::float4;
  ERROR:  invalid input syntax for type real: " INFINITY    x"
  SELECT 'Infinity'::float4 + 100.0;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT 'Infinity'::float4 / 'Infinity'::float4;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT 'nan'::float4 / 'nan'::float4;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT '' AS five, * FROM FLOAT4_TBL;
   five |     f1      
  ------+-------------

======================================================================

*** ./expected/float8.out       Thu Jun  9 06:15:29 2005
--- ./results/float8.out        Tue Mar 28 21:03:10 2006
***************
*** 35,57 ****
  ERROR:  invalid input syntax for type double precision: "123           5"
  -- special inputs
  SELECT 'NaN'::float8;
!  float8 
! --------
!     NaN
! (1 row)
! 
  SELECT 'nan'::float8;
!  float8 
! --------
!     NaN
! (1 row)
! 
  SELECT '   NAN  '::float8;
!  float8 
! --------
!     NaN
! (1 row)
! 
  SELECT 'infinity'::float8;
    float8  
  ----------
--- 35,48 ----
  ERROR:  invalid input syntax for type double precision: "123           5"
  -- special inputs
  SELECT 'NaN'::float8;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT 'nan'::float8;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT '   NAN  '::float8;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT 'infinity'::float8;
    float8  
  ----------
***************
*** 72,90 ****
  SELECT ' INFINITY    x'::float8;
  ERROR:  invalid input syntax for type double precision: " INFINITY    x"
  SELECT 'Infinity'::float8 + 100.0;
! ERROR:  type "double precision" value out of range: overflow
  SELECT 'Infinity'::float8 / 'Infinity'::float8;
!  ?column? 
! ----------
!       NaN
! (1 row)
! 
  SELECT 'nan'::float8 / 'nan'::float8;
!  ?column? 
! ----------
!       NaN
! (1 row)
! 
  SELECT '' AS five, * FROM FLOAT8_TBL;
   five |          f1          
  ------+----------------------
--- 63,76 ----
  SELECT ' INFINITY    x'::float8;
  ERROR:  invalid input syntax for type double precision: " INFINITY    x"
  SELECT 'Infinity'::float8 + 100.0;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT 'Infinity'::float8 / 'Infinity'::float8;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT 'nan'::float8 / 'nan'::float8;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT '' AS five, * FROM FLOAT8_TBL;
   five |          f1          
  ------+----------------------
***************
*** 342,348 ****
     SET f1 = FLOAT8_TBL.f1 * '-1'
     WHERE FLOAT8_TBL.f1 > '0.0';
  SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
! ERROR:  type "double precision" value out of range: overflow
  SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
  ERROR:  result is out of range
  SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ;
--- 328,335 ----
     SET f1 = FLOAT8_TBL.f1 * '-1'
     WHERE FLOAT8_TBL.f1 > '0.0';
  SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
! ERROR:  floating-point exception
! DETAIL:  An invalid floating-point operation was signaled. This probably 
means an out-of-range result or an invalid operation, such as division by zero.
  SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
  ERROR:  result is out of range
  SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ;

======================================================================

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

Reply via email to