File this warning under “unless it’s absolutely necessary.” If you use iCloud Photo Library on your Mac, don’t sign out from iCloud. Also, don’t deselect the iCloud Photo Library checkbox in either the Photos options of the iCloud pane of System Preferences or in the iCloud preferences in Photos itself.
Why not? Because, when you re-enable iCloud or iCloud Photo Library, Photos will re-upload all your photos, which could take days. (It’s not really re-uploading all of them, but even just resyncing will take a long time.) Worse, if you don’t have enough space in iCloud for your entire Photos library again, you’ll have to upgrade to a larger plan temporarily, resync, and then downgrade to your previous plan.
Apple will refund you the cost of the upgrade, but you’ll have to work with support to get reimbursed.