I think I read that the 'partition_tag' can be anything, char(), int, 
anything really, as long as you can define it in the $sql_partition tag 
in amavisd.conf.

however, on the mysql 5.1 site taking about partitions, it says they 
must be integer, or resolve to integer.

Data type of partitioning key.   A partitioning key must be either an 
integer column or an expression that resolves to an integer. The column 
or expression value may also be NULL. (See Section 18.2.6, "How MySQL 
Partitioning Handles NULL".)

http://dev.mysql.com/doc/refman/5.1/en/partitioning-limitations.html

so, our idea of using 'char(6)' and something like yyyy-ww  (so, this 
week would be '2008-47') won't work, because I don't think mysql would 
do something intelligent converting that to an integer.

also, the create tables don't take into account partition schemes.
like:
CREATE TABLE maddr (
  partition_tag integer   DEFAULT 0,   -- see $sql_partition_tag
  id         bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
  email      varbinary(255) NOT NULL,  -- full mail address
  domain     varchar(255)   NOT NULL,  -- only domain part of the email 
address
                                       -- with subdomain fields in reverse
  CONSTRAINT part_email UNIQUE (partition_tag,email)
) ENGINE=InnoDB;


would be:

CREATE TABLE maddr (
  partition_tag integer   DEFAULT 0,   -- see $sql_partition_tag
  id         bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
  email      varbinary(255) NOT NULL,  -- full mail address
  domain     varchar(255)   NOT NULL,  -- only domain part of the email 
address
                                       -- with subdomain fields in reverse
  CONSTRAINT part_email UNIQUE (partition_tag,email),
) ENGINE=InnoDB
  PARTITION BY KEY(partition_tag),
  PARTITIONS 52;

unless you do something like: or wierd things like that.
PARTITION BY RANGE( YEAR() ) (
    PARTITION p0 VALUES LESS THAN (1960),
    PARTITION p1 VALUES LESS THAN (1970),
    PARTITION p2 VALUES LESS THAN (1980),
    PARTITION p3 VALUES LESS THAN (1990),
    PARTITION p4 VALUES LESS THAN MAXVALUE
);


and, also the suggestion to delete email by partition didn't include the 
drop partition table type queries.

so, while amavisd-new supports a partition_tag, (which again, deleting 
by partition TAG might be faster), in order to support real mysql 
partitions (including innodb_file_unique.. or whatever that is called), 
you will need to do a lot of work.

upgrading systems in place might be problematic, unless somehow you 
leave 'partition_tag 0' as mysql partition 0, and consider deleting it 
(dropping partition) next year.



-- 
Michael Scheidell, CTO
Phone: 561-999-5000, x 1259
 > *| *SECNAP Network Security Corporation

    * Certified SNORT Integrator
    * King of Spam Filters, SC Magazine 2008
    * Information Security Award 2008, Info Security Products Guide
    * CRN Magazine Top 40 Emerging Security Vendors


_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.secnap.com/products/spammertrap/
_________________________________________________________________________
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to