Fasting is okay if you want. Just monitor your blood sugar regularly on days that you fast.
I fast from time-to-time. But know now that a fast doesn't always have to be a water fast. You can skip 1 meal. Or skip out on something like coffee for 24 hours.
Be well.
glipizide is in the Sulfonylurea class of drugs. Sulfonylurea drugs work by forcing the pancreas to make more insulin, insulin lowers BG. So if you dont eat and continue to take glipizide you run the risk of getting hypos. I say the risk as it depends what your BG is and how much glipizide lowers your BG.
If you are on glipizide you should have a BG test meter to check your BG. So test to see how your BG is doing.
If you have good control, checking via HbA1c, then occasional fasting should not be a problem for T2D. Metformin is well tried and tested but if you have any type of Kidney problem check with your doctor as in that scenario the active metabolites can build up and trigger arrhythmias.
As an atheist myself I do do have these religious compulsions to fast, excepting of course as a part of weight control!!