Hello,
In my opinion sqlgrey is missing a badly needed feature,
the ability to re-initialize the database connection
upon receipt of a signal. (I suggest SIGHUP.)
Some databases with which I'm familiar do not update
some important values for the duration of a database
connection. The one that's bitten me most often
in the past is the data that drives the query
planning. I know that this is a problem with
PostgreSQL 8.1, and I've run into it in other
major database products in the past.
A long-lived database connection, over
a varying dataset, can wind up running very badly
planned queries. This could be a problem for
sqlgrey, and certainly is a problem after the
initial install when the database is empty.
Such a signal would also provide a work-around
for bugs (memory leaks anyone?) in the database
back-end or the perl libraries. Cron could be used
to have sqlgrey re-connect to the db either at
regular intervals, or when a particular problem
is detected. Databases are big and complicated
and their backends are going to have bugs.
The long as the the short of it is that a lot of
databases just arn't designed to have connections
that last forever. Of course, restarting sqlgrey
is always an option. But that's an undesirable
interruption of the MTA's operation, resulting
in a window of time during which SMTP clients
get 450 responses and there is a consequent
unnecessary delay in mail delivery.
I know sqlgrey is not under active development
right now, but I hope that somebody will at
least consider this. (This is understandable,
sqlgrey works -- at least until it doesn't :)
If not, then I'd appreciate
any suggestions regarding how to archive this
request so that it can be considered by
future developers. Thank you.
Regards,
Karl <ko...@me...>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
|