Dealing with Pain and Poor Posture
Pain is a pretty useful signal. In general, it's your brain telling you something isn't right.
With joint pain, it helps to understand that your muscles directly affect your joints. Muscle tension affects joint capsule tension which in turn helps to keep your joints lubricated and your joint capsules intact.
Joint pain may be your brain telling you that a particular joint is in danger. And so a way to deal with joint pain is to experiment with muscle control so that you can find the muscle activation that alleviates your pain.
Muscle pain can be a signal that you are overworking the muscle in question. Why that muscle is overworked (or tight) may relate to poor posture. It could also relate to your brain protecting a joint. One muscle isn't working properly, so your brain uses another muscle to substitute, and over the course of time that muscle gets overworked.
Here again the solution can involve playing with muscle control to try and fix the problem.
Note that muscle control is a dual process. It involves deliberately activating or relaxing muscles. But is also involves feeling them when they activate. Muscle control is thus a means of feeling your body as well as controlling it.
Is there such a thing as poor posture? How do you define poor posture?
How do you define good posture?
Intelligently Combating Poor Posture
A similiar process can be used to deal with poor posture. Instead of dealing with a pain signal, poor posture is something you can see and in some cases feel. It can become obvious when doing particular poses or actions. Or it can become obvious when you look at yourself in a mirror.
If you are going to try and fix any problems of pain yourself, I'd suggest that part of that process includes learning to feel and control your body.
The feeling/sensing part is how you try to diagnose what is causing the problem. The controlling part is what you do to fix the problem.
Learning to feel and control your body is a very long process. And you may find yourself going in circles, till you figure out what you need to do in order to go deeper. But if you deal with problems in other areas, the same process applies. In either case, the better you understand what you are dealing with, the easier it is to fix problems, (or redefine problems so that they are fixable.)
If posture (or a lack of good posture) is the problem, the same thing applies. Practice feeling your body and controlling it so that you can then find good posture with minimum effort.