Use a sledgehammer to break up the concrete around the old post.
Fixing fence posts to concrete wall.
By following this video you will be able to do it y.
After making sure the brick is clean and free of debris string the line tightly along the line of the fence posts or stakes and mark the point where it intersects the brick wall.
How to install a fence mounted to concrete surface mount fence post with anchor bolts.
When installing a fence on an existing concrete pad some fence installers prefer to.
In this video driveway dudes ross shows you how to easily fit and secure a post to a concrete block wall.
You can apply the solution by brushing it onto the post or dipping the post into a tub filled with the liquid.
Drill hole in the post and the wall the same size usually 6 5mm no need to countersink the head they will just pull in flush some about 120 140 should be fine posted 4 years ago.
Make the hole large enough to ensure you can get a good swing at all sides of the concrete pier.
Set posts then.
Step 3 remove the old post.
Core drill holes through concrete.
But yes normally you would want to dig and post crete them in.
Once plumb re tighten fixings and check for plumb once more.
If the post is not plumb with the level sitting on the face of the post then loosen relevant fixings and insert packers between gate post and wall and repeat until face of gate post is plumb.
12mm x 100mm thunder bolts masonry depending on size of posts would do fine.