Depending on which side the pacemaker is located, and how much rotation and force is exerted by the shoulder on that side. Typically I recommend waiting 6 weeks for the pocket to heal before any activity that involves a lot of shoulder movement. Remember that regardless of the age of the pacemaker you should avoid excessive movement on that side, such as throwing a ball, so you might have to modify your golf swing accordingly.
My pacemaker is on my left side.I am right handed. Thanks for your advice Mudman