Upper gastrointestinal bleeding, particularly from a stress-induced duodenal ulcer, is an extremely important perioperative complication in cardiovascular surgery. In the present study, 33 patients undergoing elective open heart surgery between July 2000 and February 2001 were allocated to either a famotidine (FAM) or rabeprazole (RPZ) group to examine the perioperative gastric and esophageal pH readings, in conjunction with an investigation into the effect of infection with Helicobacter pylori (HP). Postoperative upper gastrointestinal bleeding did not occur in either group, and the intraoperative and postoperative mean gastric pH readings, as well as the holding time pH>6, suggested sufficient acid suppression by either drug. Gastric acid secretion was less strongly suppressed in HP-negative patients in the FAM group, but was unaffected by HP infection status in the RPZ group. The FAM group and RPZ group revealed a sufficient effect of gastric acid suppression. It was indicated that FAM had an insufficient effect of gastric acid suppression for HP-negative patients.