What is the max distance to span between six by six posts using two by twelve by twenty foot beams for a pergola.
You can easily span 12' with a 2x12 for a pergola as long as your load is not crazy. What is going on top of the 2x12's? 2x2's? I would set my posts on 12' centers and cantilever 4' on each side. I would also sandwich a 2x12 on each side of the post. There actually is enough information in your question but there are many online beam span charts. Here is one. Hope it helps. Make sure there is no earth to wood contact on your posts and you will enjoy your pergola for decades. http://www.decks.com/deckbuilding/beam_span_chart_table
There's not quite enough information here to give a definitive answer, but for decks, a rule of thumb is when supporting joists that span 12 feet, a double ply beam can span in feet a value equal to its depth in inches. Thus, a double 2x12 beam could span 12 feet - with 20' beams, posts at 10' might look the best.
That said, this is typically applicable for a deck with 10 psf dead, 40 psf live. Depending on your loading and design, this may or may not be applicable.
If you were to cantilever the beam beyond the posts, you might get away without center posts at all, but at significant risk to warping, bowing and potential instability. you could also add angled braces to help distribute loads...It all depends on the rest of the design.
This can also be very dependent on local conditions - hurricane-prone areas will be very different from others. Standard disclaimers apply - Check local building codes, talk to an engineer if needed, this advice is only worth what you are paying me for it, do so at your own risk, etc, etc...