OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: SQLite support in Postfix

From: Rob Foehl (rwfloonybin.net)
Date: Fri Jun 18 2010 - 13:10:19 CDT


On Fri, 18 Jun 2010, Victor Duchovni wrote:

> Indeed. One still needs tools to insert data into the database.
> Does Postfix need to provide a minimal interface for this, or do we
> assume that SQLite users will have adequate tools outside Postfix.

It wouldn't hurt to omit this support for the time being, as that's at
least consistent with the approach to other SQL engines. It might make
sense to roll this up into generic update support for any SQL database,
which I've been considering for a while...

> Does Postfix need to do anything to indicate transaction boundaries
> between its lookups? Or is not starting a transaction in the first place,
> sufficient to indicate that each query is independent from all the others?

SQLite v3 implements implicit transactions for writers which don't
explicitly request them, the only thing that the readers need to handle is
retrying queries after SQLITE_BUSY. The full locking semantics are
described here:

http://www.sqlite.org/lockingv3.html

-Rob