Re: PostgreSQL crashes with Qmail-SQL - Mailing list pgsql-hackers

From Bruno Wolff III
Subject Re: PostgreSQL crashes with Qmail-SQL
Date
Msg-id 20020125185007.GA11639@wolff.to
Whole thread Raw
In response to Re: PostgreSQL crashes with Qmail-SQL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Jan 25, 2002 at 12:30:17PM -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> 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:

I run qmail without any of the patches and it works just fine. There could
be something about the sql patch that requires some other patch, but
hopefully that would have been mentioned in the patch.

> 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

This is probably something caused by the patch. DJB's stuff doesn't
coredump.

> 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

This (modifying qmail-getpw) seems like a poor way to do things. You could
probably do the same thing using a script that queries the database and writes
output that can be processed by unpatched qmail-pw2u (if you want some stuff
to come from /etc/passwd) and qmail-newu. I use these (but not the sql
stuff) since only a couple of accounts should get email and I have a
couple of lists set up as subusers of my normal account to simplify
maintainance (i.e. the list files are owned by me instead of their
own accounts).

The idea of using a database to help handle local delivery is also bad.
cdb is much faster for typical kinds of usage (users change MUCH less
often than email arrives).

It would make a lot more sense to keep the authoritative information
in a database and resync the cdb information after a change.



pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: PostgreSQL crashes with Qmail-SQL
Next
From: Oleg Bartunov
Date:
Subject: contrib/tree