I generally rack my beer after 5 days into a second carboy and leave for a week! The reason I do this, is so it is still fermenting and I know it will continue fermenting in my secondary. Then I won't get oxidation in my beer cause during the fermenting there is a layer of carbon dioxide between the beer and the oxygen. I haven't had any problems yet but thought I would see if there is a better way I should be doing it? ( both carboys are well sealed!)
You can leave it in the primary as long as you need or want to. A lot of us on here rarely if ever use secondary.I even dry hop in primary. I do use secondary once in a while, mainly if I need the primary bucket.