From: Mark Wong on 14 Sep 2006 14:47 Tom Lane wrote: > Mark Wong <markw(a)osdl.org> writes: >> Tom Lane wrote: >>> This is a server-side failure --- could we see how order_status() >>> is defined? What PG version are you testing exactly? > >> I took pgsqsl snapshot from cvs on Sept 11. Due to the length of the >> file that order_status() is in and of order_status() itself, here's is a >> url for the file in the svn repository. order_status() is defined >> starting on line 710: > >> http://svn.sourceforge.net/viewvc/osdldbt/trunk/dbt2/storedproc/pgsql/c/funcs.c?view=markup > > Hmph. I think we broke something --- the error implies that some > function tried to return a tuple that hadn't been properly "blessed", > but I can't see that order_status or any of the other functions in that > file are doing anything wrong. In any case, if it used to work for you, > we had better figure out exactly why it stopped working. > > I know you've posted info before on how to set up and run the dbt code, > but could you refresh my memory? Is there a URL somewhere with the info? Here's a readme: http://svn.sourceforge.net/viewvc/osdldbt/trunk/dbt2/README-POSTGRESQL?view=markup But perhaps something much easier, using subversion: mkdir /mnt/dbt2 # for pgdata svn co https://svn.sourceforge.net/svnroot/osdldbt/trunk/dbt2 dbt2 cd dbt2 ../configure --with-postgresql=<pgsql_dir> make cd scripts/pgsql/ ../build_db -g -w 1 cd .. ../run_workload -w 1 -d 120 -c 20 -n I think that should work. That will create a 1 warehouse database and run a 120 second test with no-thinktimes. That should be sufficient to run through each transaction more than several times. Thanks, Mark ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
From: Tom Lane on 14 Sep 2006 15:03 Mark Wong <markw(a)osdl.org> writes: > But perhaps something much easier, using subversion: > mkdir /mnt/dbt2 # for pgdata > svn co https://svn.sourceforge.net/svnroot/osdldbt/trunk/dbt2 dbt2 > cd dbt2 > ./configure --with-postgresql=<pgsql_dir> configure is not in the svn checkout. I guessed that I needed to do aclocal/automake/autoconf, but automake fails: $ automake configure.ac:11: required file `config.h.in' not found $ and I don't see anyplace to get config.h.in from. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo(a)postgresql.org so that your message can get through to the mailing list cleanly
From: Mark Wong on 14 Sep 2006 15:05 Tom Lane wrote: > Mark Wong <markw(a)osdl.org> writes: >> But perhaps something much easier, using subversion: > >> mkdir /mnt/dbt2 # for pgdata >> svn co https://svn.sourceforge.net/svnroot/osdldbt/trunk/dbt2 dbt2 >> cd dbt2 >> ./configure --with-postgresql=<pgsql_dir> > > configure is not in the svn checkout. I guessed that I needed to do > aclocal/automake/autoconf, but automake fails: > > $ automake > configure.ac:11: required file `config.h.in' not found > $ > > and I don't see anyplace to get config.h.in from. Oops! 'autoreconf --install' is what I run to generate all that stuff. Sorry about that. Thanks, Mark ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo(a)postgresql.org so that your message can get through to the mailing list cleanly
From: Tom Lane on 14 Sep 2006 15:23 Mark Wong <markw(a)osdl.org> writes: > Oops! 'autoreconf --install' is what I run to generate all that stuff. Ah, better. I see at least part of the problem: CREATE OR REPLACE FUNCTION stock_level (INTEGER, INTEGER, INTEGER) RETURNS INTEGER AS '/home/tgl/dbt2/storedproc/pgsql/c/../../../storedproc/pgsql/c/funcs' LANGUAGE C STRICT; psql:/home/tgl/dbt2/scripts/pgsql/../../storedproc/pgsql/c/stock_level.sql:7: ERROR: incompatible library "/home/tgl/dbt2/storedproc/pgsql/c/../../../storedproc/pgsql/c/funcs.so": missing magic block HINT: Extension libraries are now required to use the PG_MODULE_MAGIC macro. You need to add something like this to funcs.c: #include <executor/spi.h> /* this should include most necessary APIs */ #include <executor/executor.h> /* for GetAttributeByName() */ #include <funcapi.h> /* for returning set of rows in order_status */ + + #ifdef PG_MODULE_MAGIC + PG_MODULE_MAGIC; + #endif /* #define DEBUG With that change, I didn't see run_workload report any errors, but maybe I don't know where to look. I'm not sure how this bug could have led to a "type not registered" error ... the query should've just failed outright. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster
From: Mark Wong on 14 Sep 2006 15:28
Tom Lane wrote: > Mark Wong <markw(a)osdl.org> writes: >> Oops! 'autoreconf --install' is what I run to generate all that stuff. > > Ah, better. I see at least part of the problem: > > CREATE OR REPLACE FUNCTION stock_level (INTEGER, INTEGER, INTEGER) RETURNS INTEGER AS '/home/tgl/dbt2/storedproc/pgsql/c/../../../storedproc/pgsql/c/funcs' LANGUAGE C STRICT; > psql:/home/tgl/dbt2/scripts/pgsql/../../storedproc/pgsql/c/stock_level.sql:7: ERROR: incompatible library "/home/tgl/dbt2/storedproc/pgsql/c/../../../storedproc/pgsql/c/funcs.so": missing magic block > HINT: Extension libraries are now required to use the PG_MODULE_MAGIC macro. > > You need to add something like this to funcs.c: > > #include <executor/spi.h> /* this should include most necessary APIs */ > #include <executor/executor.h> /* for GetAttributeByName() */ > #include <funcapi.h> /* for returning set of rows in order_status */ > + > + #ifdef PG_MODULE_MAGIC > + PG_MODULE_MAGIC; > + #endif > > /* > #define DEBUG > > With that change, I didn't see run_workload report any errors, but maybe > I don't know where to look. I'm not sure how this bug could have led to > a "type not registered" error ... the query should've just failed outright. The error is captured in dbt2/scripts/output/*/client/error.log, where * is the run directory. Ok, I'll give it a shot on my system. Thanks, Mark ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |