postfix-users October 2010 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: verify db with mysql

Re: verify db with mysql

From: Wietse Venema <wietse_at_nospam>
Date: Sat Oct 02 2010 - 16:47:14 GMT
To: Postfix users <>

Stefan Jakobs:
> > Does the database support a first/next operation?
> The operation which comes close to that, is to select the whole table and then
> fetch the keys row by row. Yes, I think that is a first/next operation (with a
> bad performance).
> What would be the answer if there wasn't a first/next operation?

A DBMS without iterator does not seem plausible.

The dict_cache cleanup code slowly scans the DBMS for obsolete
records and removes them while allowing the verify or postscreen
process to handle requests from other Postfix processes.

This means that the MySQL client will need to handle two streams
of requests that are interleaved:

1 - One stream of first/next/lookup/delete requests from the cache
    cleanup code.

2 - One stream of lookup/update requests that are triggered by
    smtpd (lookup) and by delivery agents (update).

These two streams must be able to co-exist. Cache cleanup can take
a long time, and it is not acceptable that the cache cleanup (stream
1) must run from start to completion without allowing requests from
stream 2.