This is really a question for your surgeon since there are different recommendations. alcohol is a blood thinner and you definitely don't want to combine it with pain meds after surgery. However the effects of alcohol on blood clotting are probably short acting, but may be accentuated by other compounds in red wine.
In general I advise my patients to stop alcohol and tobacco use 2 weeks prior to surgery to allow the byproducts to clear out of their system. Each surgeon will have different opinions so its best to talk to your surgeon about what they want you to do.