> Hallo Michael, > > >> We have systems with multi master (dual master and more). We had to >> remove >> the foreign key constraints long ago. (for that and other reasons). >> > So you advise me to just drop them? > ALTER TABLE `quarantine` DROP FOREIGN KEY `quarantine_ibfk_1`; > ALTER TABLE `msgs` DROP FOREIGN KEY `msgs_ibfk_1`; > ALTER TABLE `msgrcpt` DROP FOREIGN KEY `msgrcpt_ibfk_1`; > ALTER TABLE `msgrcpt` DROP FOREIGN KEY `msgrcpt_ibfk_2`; > You have to and they really help you if you depend on them to automatically cleanup up orphan records. >> > I am using the current week as the number for the partition tag. Since I have > just two systems where Amavisd-New is running I added on system 1 additionally > 100 to the week number and on system 2 I have added 200 to the week number.
You did added the modulus 100 to make sure that mysql replication didn't end up with an email address on server 1 with a id of 101 and the same email address on server 2 with a id of 201? (or whatever) Yes, that seems to be one way to make sure you don't have duplicate key error, and by using a cleaver query (mod or, maybe coalesce) you can 'merge' the partitions together to do queries. > DELETE FROM msgs WHERE MOD(partition_tag,100) < WEEK(NOW(),3); > DELETE FROM msgrcpt WHERE MOD(partition_tag,100) < WEEK(NOW(),3); > DELETE FROM quarantine WHERE MOD(partition_tag,100) < WEEK(NOW(),3); > DELETE FROM maddr WHERE MOD(partition_tag,100) < WEEK(NOW(),3); If you created these with REAL partitions, then you could alter table drop partition (which is even faster) -- Michael Scheidell, CTO >|SECNAP Network Security Finalist 2009 Network Products Guide Hot Companies FreeBSD SpamAssassin Ports maintainer _________________________________________________________________________ This email has been scanned and certified safe by SpammerTrap(r). For Information please see http://www.secnap.com/products/spammertrap/ _________________________________________________________________________ ------------------------------------------------------------------------------ _______________________________________________ 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/