There were a couple people who transferred from my residency. It didn't seem that difficult, provided you have a good reason (family, finances, etc). Your PD does have to sign off on your transfer because your new program is probably going to want a letter from him/her.
I know this probably isn't your intention, but you do kind of screw over your co-residents by transferring. Your position may not get filled until the upcoming year.
If you need to transfer, definitely time it so the program is aware about the open spot in time to add an extra spot for the Match. I think people transfer all the time, so it must not be that difficult, but like the other poster said, you have to get your PD on board.