Subject: Re: JAVA on MP, current pgsql
To: None <port-i386@netbsd.org>
From: Bob Kemp <bsd@allegory.demon.co.uk>
List: port-i386
Date: 01/22/2005 16:49:47
On Fri, Jan 21, 2005 at 12:08:20AM +0000, Bob Kemp wrote:
> On Thu, Jan 20, 2005 at 12:02:28PM -0800, Andrew Gillham wrote:
> > Does anyone have time to do a binary search on cvs for the days
> > between known good and known bad?

> It must have happened between 2004-11-1 and 2004-12-21.
> I can try to get a more precise date.

I ran some tests using the script below and the bug seems to appear after
changes on the 18th Dec.  For me, 2004-12-18 works but 2004-12-19 doesn't.
Of course, the changes might have just triggered an existing bug.

If anybody wants to double check, the test script will need local customisation.
See especially MyCommand(), getDate() and pkgclean.

Bob

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#!/bin/ksh

MyCommand() {
    psql -d MyDbase -U MyUser \
	-c "
	    select dDate,dOpen,dHigh,dLow,dClose,dVolume
	    from amex_prices_daily
	    where stockId = ( SELECT stockId FROM symbols natural join
				exchanges WHERE ticker = 'qqqq' and exchange = 'amex' )
	    order by dDate
	" > /dev/null &

}

getDate() {
    cd /usr/pkgsrc
    root=:pserver:anoncvs@anoncvs.fr.NetBSD.org:/pub/NetBSD-CVS 

    ## Quick tests
    ## cvs -d $root up -D $1 -Pd databases/*postgresql74* mk pkgtools

    ## Final tests
    cvs -d $root up -D $1 -Pd
}

pgsql() {
    /etc/rc.d/pgsql $1
}

deletePkgs() {
    pkg_delete $(echo $pkgs)
}


pkgs='
    postgresql74
    postgresql74-docs
    postgresql74-server
    postgresql74-client
    postgresql74-lib
'

date=2004-11-1			## OK
date=2004-11-10			## OK
date=2004-11-30			## OK
date=2004-12-10			## OK
date=2004-12-18			## OK
## date=2004-12-19			## FAILS


echo ''
echo Deleting pkgsrc work dirs
    ## From pkgsrc/pkgtools/pkgclean -- deletes all work dirs
pkgclean
## If you don't have pkgclean, uncomment the following
## rm -rf /usr/pkgsrc/*/*/work

echo ''
echo Updating from CVS
getDate $date

echo ''
pgsql stop
deletePkgs

echo ''
echo Before building: pkgs are
pkg_info | egrep -i postgresql
echo '.'

cd /usr/pkgsrc/databases/postgresql74
make install >/dev/null

echo ''
echo After building: pkgs are
pkg_info | egrep -i postgresql
echo '.'

pgsql start

j=1
while [[ $j -le 30 ]]; do
    MyCommand > /dev/null &
    j=$(( $j + 1 ))
done

ps t
sleep 5
print '\n\n'
ps t