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: Thu Oct 28 2010 - 21:41:56 GMT
To: Postfix users <postfix-users@postfix.org>

Thanks for the patch.

Stefan Jakobs:
> I'am not aware of any dead-lock issues. The sequence pseudo-thread
> will query the database only once with the first key. For every
> next key the sequence pseudo-thread is working with the results
> in the memory. With a very large database the size of the response
> may be a problem. But a INSERT/DELETE/UPDATE operation will not
> conflict with the sequence pseudo-thread. Finally, I can not
> prove if the code is dead-lock safe.

It appears that this sequence() implementation uses memory in
proportion to the database size. That is not acceptable. Would it
be possible to maintain state with a limited amount of memory for
a database cursor?

By design, Postfix memory usage must not keep growing with increasing
data size, queue size, message size, database size etc. This is
necessary to ensure sane handling of overload. It is not acceptable
that Postfix becomes deadlocked under overload.

The alternative would be to disable database cleanup by Postfix
and to rely on other software to clean the databasem but that
is a problem because the database format is not public.

        Wietse