The short answer
Usually, yes. You can install a pergola on a concrete patio, but you generally can’t dig post holes through the slab. The usual approach is to fix surface-mounted post bases to the concrete with anchors. A bigger job is to cut into the slab and set footings below it. Either way, the slab has to be sound, thick enough and suited to the load.
Check the slab first
Look at the slab before you buy anything. Cracks, flaking, crumbling and spots that have sunk or moved all suggest the concrete may not hold anchors well. A slab that is thin or in poor shape may need repair or a different plan.
Also check what’s under it. If the slab sits over a basement, garage or crawl space, ask an engineer before you add loads or anchors.
A related question, “Can you build a deck over existing concrete?”, has a different answer, because a deck and a pergola carry their loads in different ways.
Surface-mounted post bases
Post bases bolt to the slab with concrete anchors, such as wedge anchors or sleeve anchors, and the post sits on top. This avoids digging through the concrete. It also lifts the wood off the slab, so water drains away and the bottom of the post stays drier.
Drill the holes to the depth and size the anchor maker specifies, and keep the anchors well away from the edges of the slab. Anchors set too close to an edge can crack the concrete.
Cutting into the slab
For a heavier pergola, or one that needs deeper footings, the slab can be cut and footings dug below it. This takes concrete saws and care. Before you cut, locate buried utility lines and any steel reinforcing bars in the slab, because cutting into them can cause damage or injury. Check your local permit rules too.
Wind and uplift
A pergola can be pushed sideways or lifted by strong wind, especially with a solid roof. Post bases and anchors need to resist that uplift and sideways force as well as the weight of the structure. The right size and number of anchors depends on the slab, the loads and the post base design. Use products with listed ratings, and follow the manufacturer’s instructions for spacing and embedment.
Water and drainage
Water that pools around post bases can soak into the end grain and cause rot. Check that the slab slopes away from the house and that water doesn’t collect at the base of each post. Use corrosion-resistant fasteners, and keep bare wood off the concrete.
Attached to a house
If the pergola attaches to the house, the connection and flashing matter just as they do for any attached structure. The patio slab may run right up to the wall, which can make proper flashing harder. Check the rules for attached structures, which can differ from freestanding ones.
When to ask a professional
Ask a structural engineer or a licensed contractor if the slab is cracked or thin, sits over a space below, or if the pergola is large or carries a solid roof. Local rules may also require drawings stamped by an engineer.