Hi
When the bolts are torqued, they put the O-ring under maximum compression (total tension in bolts produced by torque divided by length and width of O-ring).
When the vessel or pipe is pressurized, the compressive force on the O-ring is reduced by the force that tries to separate the two parts being connected.
A good design will determine the total preload force in the bolts necessary to keep the minimum compression on the O-ring when the vessel is pressurized to be at least the minimum value recommended by the O-ring manufacturer or the Pressure Vessel Code. This is required to avoid leakage.
Notice that the pressure inside the vessel does not change (theoretically) the tension in the bolts. It just reduces the compression on the O-ring.
Normally, the bolts are preloaded to around 90% of their proofload. Verify this on the Pressure Vessel Code.