> Hello list
> 
> I am running here Amavisd-new 2.6.4 with MySQL in dual master replication and
> I often get into problems that Amavisd-new data in MySQL can't be replicated
> because of foreign key constraint.
> 
> Is there any documentation how to setup Amavisd-new in a MySQL environment
> with dual master replication? I can't find any documentation targeting that
> topic.

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).  Mostly
the daily quarantine cleanup performance.  (its faster, believe it or not,
on mysql to not use foreign key when so much data is in flux.
We also use the tabbed dump and load rather then mysqldump, and foreign keys
would not always exist in the order that the dump is re-imported.


Its faster to run some of the cleanup routines at the end of
README.sql-mysql.

DELETE FROM quarantine
  WHERE NOT EXISTS (SELECT 1 FROM msgs WHERE mail_id=quarantine.mail_id);
DELETE FROM msgrcpt
  WHERE NOT EXISTS (SELECT 1 FROM msgs WHERE mail_id=msgrcpt.mail_id);

If you are using partitions, you can drop the partition instead.


-- 
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/ 

Reply via email to