It is well known that magnesium sulfate has a membrane stabilizing effect , and broad spectrum anti arrhythmic properties. In this trial, the investigators study its prophylactic effect against atrial fibrillation in postoperative period of cardiac surgery.