Photosynthesis was producing oxygen both before and after the GOE. The difference was that before the GOE, organic matter and dissolved iron chemically captured any free oxygen. Earth has much iron, and iron has higher solubility than its oxides, so the oceans had much dissolved iron. It became iron oxide and made huge deposits as banded iron rock from the Archaean and Proterozoic eras. When not enough iron remained to capture more oxygen, free oxygen accumulated in the atmosphere. This was the GOE.