[HACKERS] 7.4RC1 failed to build on Linux

2003-11-03 Thread Kenji Sugita
  Failed to build on Linux.
  
$ uname -mrp
2.2.18-0ph1smp i686 unknown
$ uname -mr 
2.2.18-0ph1smp i686
$ cat /etc/redhat-release 
Red Hat Linux release 6.2 (Zoot)
$ gcc --version
2.95.3
$ cat ../myconf 
#!/bin/sh

CFLAGS=-O2 ./configure  \
--with-tcl  \
--without-tk\
--prefix=/opt/pgsql/7.4RC1  \
--enable-integer-datetimes
$ ../myconf 21 | tee myconf.out
...
$ time make 21 | tee make.out
...
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations pgtclAppInit.o 
-L../../../src/interfaces/libpgtcl -lpgtcl -L../../../src/interfaces/libpq -lpq 
-L/usr/lib -ltcl8.0jp -ldl  -lieee -lm -L../../../src/port  
-Wl,-rpath,/opt/pgsql/7.4RC1/lib -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd  
-lpgport -o pgtclsh
../../../src/interfaces/libpgtcl/libpgtcl.so: undefined reference to 
`Tcl_NewByteArrayObj'
../../../src/interfaces/libpgtcl/libpgtcl.so: undefined reference to 
`Tcl_GetByteArrayFromObj'
collect2: ld returned 1 exit status
make[3]: *** [pgtclsh] Error 1
make[3]: Leaving directory `/usr/local/pgsql/7.4RC1/build/src/bin/pgtclsh'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/pgsql/7.4RC1/build/src/bin'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/pgsql/7.4RC1/build/src'
make: *** [all] Error 2
Command exited with non-zero status 2
206.91user 12.52system 3:39.38elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (523032major+569611minor)pagefaults 0swaps
$ 
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations pgtclAppInit.o 
-L../../../src/interfaces/libpgtcl -lpgtcl -L../../../src/interfaces/libpq -lpq 
-L/usr/lib -ltcl8.0jp -ldl  -lieee -lm -L../../../src/port  
-Wl,-rpath,/opt/pgsql/7.4RC1/lib -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd  
-lpgport -o pgtclsh
../../../src/interfaces/libpgtcl/libpgtcl.so: undefined reference to 
`Tcl_NewByteArrayObj'
../../../src/interfaces/libpgtcl/libpgtcl.so: undefined reference to 
`Tcl_GetByteArrayFromObj'
collect2: ld returned 1 exit status
make[3]: *** [pgtclsh] Error 1
make[3]: Leaving directory `/usr/local/pgsql/7.4RC1/build/src/bin/pgtclsh'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/pgsql/7.4RC1/build/src/bin'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/pgsql/7.4RC1/build/src'
make: *** [all] Error 2
Command exited with non-zero status 2
206.91user 12.52system 3:39.38elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (523032major+569611minor)pagefaults 0swaps
$ 


Kenji Sugita  

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] Index counters of statistics collector does not work

2003-07-20 Thread Kenji Sugita
From: Mendola Gaetano [EMAIL PROTECTED]
Subject: Re: [HACKERS] Index counters of statistics collector does not work on 7.4devel
Date: Sun, 20 Jul 2003 15:42:29 +0200

;;; Kenji Sugita [EMAIL PROTECTED] wrote:
;;;  =# explain select * from class1 where id = 1234;
;;;QUERY PLAN
;;;  --
;;; 
;;;   Index Scan using class1_id_index on class1  (cost=0.00..3.01 rows=2
;;; width=4)
;;; Index Cond: (id = 1234)
;;;  (2 rows)
;;; 
;;; I don't think that the select is really performed, try the same experiment
;;; but doing
;;; explain analyze instead.

I forgot to include a select without explain.  I found it July 15. Anyway it
works for today's version.


Kenji Sugita  


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


[HACKERS] vacuumdb can't be canceled

2003-07-12 Thread Kenji Sugita
Vacuumdb command can't be canceled by Control-C and VACUUM is still running.
When wrong database name is specified to vacuumdb, cancellation is required to
stop VACUUM FULL which runs long.

Option -c of psql forget to set signal handler for 7.3 or prior. Vacuumdb
have no signal handler of cancellation for 7.4devel.


Kenji Sugita  


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed:

2003-07-09 Thread Kenji Sugita
From: Kurt Roeckx [EMAIL PROTECTED]
Subject: Re: [HACKERS] PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid 
argument
Date: Sun, 6 Jul 2003 18:44:35 +0200

;;; On Sun, Jul 06, 2003 at 06:30:04PM +0200, Kurt Roeckx wrote:
;;;  Try the attached patch instead.
;;; 
;;; Oops, that one was a little broken. I change it.
;;; 
;;; Try the attached one instead.

I tried the newest one.

  Red Hat 6.2
$ postmaster
# Waiting forever

$ top
 11:24am  up 276 days, 14:12,  2 users,  load average: 0.90, 0.66, 0.35
46 processes: 44 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: 49.6% user,  0.8% system,  0.0% nice, 49.5% idle
Mem:  2009220K av, 1544312K used,  464908K free,   37792K shrd, 1402556K buff
Swap:  265064K av,4024K used,  261040K free   78444K cached

  PID USER PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
12074 sugita10   0  1668 1668  1328 R   0 99.2  0.0   1:00 postmaster
..

  Mac OS X 10.2.6
$ postmaster
2003-07-08 11:48:32 [1512] LOG:  PGSTAT: socket() failed: Protocol not supported


Kenji Sugita  

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed:

2003-07-08 Thread Kenji Sugita
From: Kurt Roeckx [EMAIL PROTECTED]
Subject: Re: [HACKERS] PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed:
Date: Tue, 8 Jul 2003 22:25:44 +0200

;;;  ;;; On Sun, Jul 06, 2003 at 06:30:04PM +0200, Kurt Roeckx wrote:
;;;  ;;;  Try the attached patch instead.
;;;  ;;; 
;;;  ;;; Oops, that one was a little broken. I change it.
;;;  ;;; 
;;;  ;;; Try the attached one instead.
;;;  
;;;  I tried the newest one.
;;; 
;;; I did some investigation on a redhat 6.0.  It seems getaddrinfo
;;; is really broken.



;;; It returns an AF_INET socket, but it doesn't say it should be of
;;; socket type SOCK_DGRAM.  

I pointed it in the first post. Rturned type is not SOCK_DGRAM.

;;;  It also returns an AF_UNIX socket and
;;; for that it sets the socktype correct, but we don't want to use
;;; the AF_UNIX one.
;;; 
;;; I'm going to assume that Mac Os X is broken in the same way.
;;; 
;;; Here is a new patch.

It works on both platforms.

Thanks.


Kenji Sugita  


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


Re: [HACKERS] PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed:

2003-07-07 Thread Kenji Sugita
From: Kurt Roeckx [EMAIL PROTECTED]
Subject: Re: [HACKERS] PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid 
argument
Date: Sun, 6 Jul 2003 18:44:35 +0200

;;; On Sun, Jul 06, 2003 at 06:30:04PM +0200, Kurt Roeckx wrote:
;;;  Try the attached patch instead.
;;; 
;;; Oops, that one was a little broken. I change it.
;;; 
;;; Try the attached one instead.

I tried the newest one.

  Red Hat 6.2
$ postmaster
# Waiting forever

$ top
 11:24am  up 276 days, 14:12,  2 users,  load average: 0.90, 0.66, 0.35
46 processes: 44 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: 49.6% user,  0.8% system,  0.0% nice, 49.5% idle
Mem:  2009220K av, 1544312K used,  464908K free,   37792K shrd, 1402556K buff
Swap:  265064K av,4024K used,  261040K free   78444K cached

  PID USER PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
12074 sugita10   0  1668 1668  1328 R   0 99.2  0.0   1:00 postmaster
..

  Mac OS X 10.2.6
$ postmaster
2003-07-08 11:48:32 [1512] LOG:  PGSTAT: socket() failed: Protocol not supported


Kenji Sugita  

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


[HACKERS] PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalidargument

2003-07-02 Thread Kenji Sugita
It seems that a value of addr-ai_socktype returned by getaddrinfo in
pg_stat.c is not SOCK_DGRAM.


Kenji Sugita  


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [HACKERS] PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed:

2003-07-02 Thread Kenji Sugita
From: Kurt Roeckx [EMAIL PROTECTED]
To: Kenji Sugita [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Date: Wed, 2 Jul 2003 19:20:11 +0200

;;; What system are you running on, and does it have a getaddrinfo()
;;; or not?

Red Hat Linux and Mac OS X 10.2.6. Both nm libc display getaddrinfo as follows:

$ nm /lib/libc.so.6 | grep getaddrinfo
0009fe3c T getaddrinfo
$ 

$ nm /usr/lib/libc.dylib | grep getaddrinfo
/usr/lib/libc.dylib(getaddrinfo.o):
90037dc0 T _getaddrinfo
 U _getaddrinfo
$

;;; If I tell getaddrinfo() it should return a SOCK_DGRAM, it can
;;; only mean that getaddrinfo() is broken.

What value shuld be passed to a following socket call with addr-ai_socktype?

  pgstats.c  
if ((pgStatSock = socket(addr-ai_family,
addr-ai_socktype, addr-ai_protocol))  0)
{
elog(LOG, PGSTAT: socket() failed: %m);
goto startup_failed;
}

From: Kurt Roeckx [EMAIL PROTECTED]
Subject: Re: [HACKERS] PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid 
argument
Date: Wed, 2 Jul 2003 20:52:00 +0200

;;; On Wed, Jul 02, 2003 at 08:35:00PM +0200, Kurt Roeckx wrote:
;;;  On Wed, Jul 02, 2003 at 03:49:19PM +0900, Kenji Sugita wrote:
;;;   It seems that a value of addr-ai_socktype returned by getaddrinfo in
;;;   pg_stat.c is not SOCK_DGRAM.
;;;  
;;;  What do you base this on?

Red Hat Linux 6.2 base.

$ uname -rs   
Linux 2.2.18-0ph1smp
$ 

For Mac OS X it produces LOG:  PGSTAT: socket() failed: Protocol not supported.

;;;  My guess is that it returns an ipv6 address while you do not have
;;;  IPv6 support in the kernel.  If that is the case, the attached
;;;  patch should fix it.
;;;  
;;; 
;;; Oops typo, fixed in new attachment.

I tried it for current build.

Index: postmaster/pgstat.c
===
RCS file: /projects/cvsroot/pgsql-server/src/backend/postmaster/pgstat.c,v
retrieving revision 1.37
diff -u -r1.37 pgstat.c
--- postmaster/pgstat.c 12 Jun 2003 07:36:51 -  1.37
+++ postmaster/pgstat.c 3 Jul 2003 01:19:05 -
@@ -179,7 +179,7 @@
/*
 * Create the UDP socket for sending and receiving statistic messages
 */
-   hints.ai_flags = AI_PASSIVE;
+   hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = 0;
$ 

And then:

$ postmaster (on Red Hat)
...
2003-07-03 10:19:38 [29761] LOG:  XX000: PGSTAT: getaddrinfo2() failed: Name or 
service not known
LOCATION:  pgstat_init, pgstat.c:193
...
  

Kenji Sugita  

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings