This is looking really good!

Rather than pushing the next_uid generator down into the database,
however, I'd like to see it happen in a function up at the application
level. This way we can easily hook up some cluster coordination code.
For your first pass, the function would just do the same thing as the
plpgsql code.

Aaron

On Sun, 2007-06-03 at 11:31 -0400, James Cloos wrote:
> This is where I am at in converting to per-mailbox uid values for imap.
> 
> I still need to port the trigger to sqlite and write some equivilent
> code for mysql (I presume compatability with versions of mysql which
> do not support stored procedures is required?), write a transition
> schema for each, and finish the imap side of things.
> 
> I first tried to replace all use of message_idnr as a priamry key with
> the tuple (mailbox_idnr, message_uid), but found a couple of places in
> the C which would require substantial refactoring.  So instead I added
> a message_uid column to messages and a next_uid column to mailboxes.
> 
> With this patch, dbmail-smtp works perfectly.  I've not tested lmptd,
> but expect that to work as well.
> 
> But I'm still having some issues getting the mail back out.  I have to
> audit every use of mailbox_idnr to determine whether it or mailbox_uid
> should be used there.  (As an example, in dbmail-imapsession.c's
> dbmail_imap_session_get_msginfo(), the lo and hi variables end up with
> idnr values rather than uid values, suggesting that something is still
> passing idnr rather than uid to the imap client....)

_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to