pltcl, linker and statistical functions
pltcl, linker and statistical functions
От:
Michel Decima <michel.decima@rd.francetelecom.fr>
Дата:
Hello,
I'm a beginner postgresql admin and I have problems with pltcl on a solaris
box.
Some users need statistical function (standard deviation, variance) and
I know
that this feature is not (yet) implemented. I found a piece of Tcl code
in the
mailing list archive at
http://www.postgresql.org/mhonarc/pgsql-sql/1998-10/msg00070.html
and I'm trying to make it work...
Currently, the pltcl language is installed, all functions and aggregates are
created, but when I launch the query in psql :
select a, count(b) as n, average(b),
variance(b), stddev(b) from t1 group by a;
I got the following error message :
ERROR: Load of file /usr/local/pgsql/lib/pltcl.so failed: ld.so.1: /usr/
local/p
gsql/bin/postmaster: fatal: relocation error: file /usr/local/pgsql/lib/
pltcl.so
: symbol CurrentMemoryContext: referenced symbol not found
Is there a way to solve this dynamic link problem ?
Note : the pltcl is not really needed for itself. I'm just looking for the
statistical functions, so every solution is wecome ;)
Michel.
OS: Solaris 2.7
Used Software:
gcc-2.95.2
make-3.79
binutils-2.9.1
flex-2.5.4
bison-1.28
Source: postgresql-7.0.2
Configuration:
./configure \
--prefix=/usr/local/pgsql \
--with-x \
--with-perl \
--with-odbc \
--without-CXX \
--with-tcl \
--with-includes=/usr/local/pgtools/include \
--with-libs=/usr/local/pgtools/lib \
--with-tclconfig=/usr/local/pgtools/lib \
--with-tkconfig=/usr/local/pgtools/lib
Environment variables:
PGHOME=/usr/local/pgsql
PGLIB=/usr/local/pgsql/lib
PGDATA=/var/local/lib/pgsql/data
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/openwin/lib:/usr/local/pgsql/lib
Too many open files in system
От:
"Toma Vailikit" <toma@nutz.org>
Дата:
I run a pretty heavily visited web site and am using postgres aa the SQL database on it. I'm beta testing some stuff and after a while Postgres dies like a dog and I get the following entries in the log: FATAL 1: File '/usr/local/pgsql/data/PG_VERSION' does not exist or no read permission. postmaster: StreamConnection: accept: Too many open files in system I can reproduce this by just blasting away at the refresh button on a browser. Anyone have any ideas?
Re: Too many open files in system
От:
Stephan Szabo <sszabo@megazone23.bigpanda.com>
Дата:
It sounds as if postgres is running into the kernel's system open files limit. What is it set to, and how many backends are running when this starts happening? Stephan Szabo sszabo@bigpanda.com On Tue, 17 Oct 2000, Toma Vailikit wrote: > I run a pretty heavily visited web site and am using postgres aa the SQL > database on it. I'm beta testing some stuff and after a while Postgres dies > like a dog and I get the following entries in the log: > > FATAL 1: File '/usr/local/pgsql/data/PG_VERSION' does not exist or no read > permission. > postmaster: StreamConnection: accept: Too many open files in system > > I can reproduce this by just blasting away at the refresh button on a > browser. Anyone have any ideas? >
Re: pltcl, linker and statistical functions
От:
Michel Decima <michel.decima@rd.francetelecom.fr>
Дата:
>ERROR: Load of file /usr/local/pgsql/lib/pltcl.so failed: ld.so.1: /usr/ >local/pgsql/bin/postmaster: fatal: relocation error: file /usr/local/pgs >ql/lib/pltcl.so: symbol CurrentMemoryContext: referenced symbol not found > > Is there a way to solve this dynamic link problem ? ok, sorry for the question... it is a solaris/gcc problem and the answer is here : http://www.postgresql.org/mhonarc/pgsql-hackers/2000-03/msg00030.html to make it work, I just added the following line to the solaris_sparc_gcc template: LDFLAGS:-Wl,--export-dynamic MD.