Lots of cops carry Baby Glocks on the ankle, and I can even think of a couple of agencies that issue the ankle rigs along with the backup guns.
That said, a G27 is kinda chunky for ankle carry and will take some getting used to. If your uniform pants blouse enough, Gould & Goodrich makes an ankle holster that goes outside the boot. VERY comfortable.
With even the best of the ankle holsters, it's gonna take a good solid week to get comfortable with it. Commit to the week. Another option is a vest holster.
Depending on how big you are and your uniform pants are, the pocket carry may or may not work. You've also got to consider what on your duty belt might block your access to the pocket. If you do go with pocket carry for your G27, I would STRONGLY advise sewing Velcro closures onto the opening of that pocket. Leave about two fingers width open at the top.
This will keep the gun from falling out of the pocket if you go butt over teakettle in a fight or a fall, but will let you knife your own hand in to get the pocket Glock if you need it quick. (And, I know you know this already, but not everyone reading this may -- be sure it's in a good quality pocket holster that covers the trigger guard.)
Good luck and stay safe out there,