I have heartburn a bit, but am really knocked for 6 by bouts of gastritis which seems to essentially be the same issue manifesting in a slightly different way (inflammation of the stomach lining causing acute pain). Gaviscon and Tums helped for mild heartburn last pregnancy but barely touched the really nasty episodes. This time 'round I'm on ranitidine and as long as I remember to take it early enough (as soon as I get the first little niggle that pain is imminent) and don't over indulge, it's an absolute life saver.

ETA: Incidentally, it's an OTC med, so you can trial it yourself or else wait to have a chat with yr OB. xo