Re: PostgreSQL crashes with Qmail-SQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: Michael Devogelaere <michael(at)digibel(dot)be>, Justin Clift <justin(at)postgresql(dot)org>, PostgreSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostgreSQL crashes with Qmail-SQL
Date: 2002-01-25 17:30:17
Message-ID: 26604.1011979817@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
> As a side question, how far do you need to install qmail to use the test?
> I'd gotten the test files to run against a 7.1 server I set up, but didn't
> feel comfortable doing a full install of qmail if possible.

I didn't want to do that either. I managed to get things running by
unpacking the rpm, unpacking the qmail-1.03.tar.gz original sources,
applying the qmail-sql-0.19.patch (and not any of the other ones,
which might've been a mistake), then setting up the three needed config
files by hand:

$ cat sqltype.h
/* Uncomment to choose postgresql */
#define SQLTYPE PGSQLTYPE
/* Uncomment to choose mysql */
// #define SQLTYPE MYSQLTYPE
$ cat sql.headers
-I/usr/include/pgsql
$ cat sql.lib
-lpq
$

and then I was able to do "make qmail-getpw" which is the only
executable you need for the benchmark. Put that somewhere, copy
the sqlserver.sample file to where qmail-getpw will look for it [1]
and edit to taste, and you're set.

Caution: I wasted some time running "benchmarks" that proved only
to be exercising how fast the client could fail. qmail-getpw's
approach to error handling seems to be (a) don't bother testing for
very many error conditions (eg, it coredumps on an empty sqlserver
control file), and (b) if it does detect a failure, exiting with a
nonzero error code is a sufficient way of reporting it. Error messages
are for wimps, apparently. So don't bother running the querydb script
until you've made *sure* qmail-getpw is working. After running the
initdb script (watch out for name conflicts with ours!) you should get

$ ./qmail-getpw alias0 domain0
alias00existance_irrelevant_for_testing-alias00trash(at)devnull(dot)biz$

if all is well. Lack of output means you have a problem.

regards, tom lane

[1] I didn't bother making the expected /var/qmail/control/sqlserver,
but just put the sqlserver file in subdirectory control of where I
was running the tests. Works fine since qmail-getpw doesn't check
whether its chdir("/var/qmail") succeeds.

[2] No, I don't think I'll be trusting my email to this thing real soon.
But I'd like to know whether it really is provoking a PG crash.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 2002-01-25 17:54:27 Re: PostgreSQL crashes with Qmail-SQL
Previous Message Hannu Krosing 2002-01-25 17:28:02 Re: RTREE Index on primary key generated by a sequence