[Mailman-Developers] Questions in regard to the database operations

Danci Emanuel danci_emanuel at yahoo.com
Wed Jun 27 01:43:56 CEST 2012



Thanks for all the explanations, Barry! Now everything is much more clear!

Indeed, is not necessary for us to save every bit of space, so I will 
go with the second option that you presented initially, by setting the 
"delivery_status" flag to the appropriate value.

Thanks again for you help!
 
Emanuel 


________________________________
 From: Barry Warsaw <barry at list.org>
To: Danci Emanuel <danci_emanuel at yahoo.com> 
Cc: "mailman-developers at python.org" <mailman-developers at python.org> 
Sent: Tuesday, June 26, 2012 3:54 AM
Subject: Re: [Mailman-Developers] Questions in regard to the database operations
 
On Jun 25, 2012, at 03:30 PM, Danci Emanuel wrote:

>As for the latter problem, I still have something in mind. If we were to
>choose the  second option (the one which implies setting the flag
>"delivery_status" to the proper value) does this not mean that we will have
>to keep the user`s preferences alive, without deleting them?

Here's how preferences work.

There is an IPreferences interface which describes the kind of things that are
"preferences".  Members, users, and addresses all can have a pointer to a
preferences record.  There are also some system default preference values.
When we look up a preference on a member, the search order goes like this:

* member
* address
* user
* system

meaning, if the member doesn't have a preference set, we fall back to the
subscribed address, then to the user linked to that address, and finally the
system default.  At each level, the object only has a preference record if
explicitly created.  Usually, they don't have preferences (meaning the system
default takes over).

When a member record is deleted, only that member's preferences are deleted.
If either the address and user associated with that member has a preferences
record, it *has* to stick around because an address or user can be subscribed
to many mailing lists.  E.g. You could decide that you want all your postings
to be acknowledged.  You'd set that on your user record and then all your
subscriptions would automatically inherit it.

I don't see much savings in trying not to delete a member's preferences when
being unsubscribed.  It's just a row in the database, and probably not a very
big one at that.  Plus, it'll usually be empty anyway.

Cheers,
-Barry


More information about the Mailman-Developers mailing list