This is one of the typical chiken or egg circular discussion. You will get many different answers based on opinions. It is not specified in any codes or standards as there is too many variables.
I have heard the definition "If you can drill a hole through the part and get wet, then it is pressure retaining."
I have heard "if you remove the part and pressure is released, then it is pressure retaining."
The PED has a good definition in stating "if pressure is a significant design factor". In other words, if the stress on the part is not affected by pressure, then it is not to be documented like it is pressure retaining. For example, cover bolting, if tightened correctly, will not be subject to additional stress when the valve is pressurized. Same is true for the gland studs and compression plate.
Naturally others will argue that cover bolts, gland studs and compression plates are pressure retaining. If you use the rule "if you remove them, the valve will not hold pressure" then they are right.
In you the end, this is a commercial issue. For every part you declare is pressure retaining, there is a cost for test reports and other quality documentation. Each case will need to be agreed between the manufacturer and customer. In the meantime, pick the rule you want to use. But don't be surprised if someone using a different rule disagrees and argues their point. Who's right in the end. The person willing to pay for the certification is right.