If you look at posts on pegolas in public parks or outside buildings they often appear to be bolted into a metal bracket which stands proud of ground level by a couple of inches on a thinner round post which is concreted into the ground.
Mind you, I've had a fence fall down where the wooden...