The max exposure time is 5 minutes (depending upon focal length)
In practice, I tried a 500mm mirror lens (one of those cheap Rokinon's) and it came back with about a 90sec exposure time.
The time also varies with 'declination' e.g. how many degrees from horizontal, you have the camera angled on the tripod.
I've not measured the impact on time when pointing the cam. straight up (overhead)
I still need to do that, it's just been too cloudy in the Phoenix, AZ metro area to attempt astro shots as of late.
Misplaced my Pentax IR remote.. so need to try the K-5 tethered with PK_tether. K-5 should be able to do an indefinite exposure time. I dont like how you are limited to 30secs in bulb mode unless you use some sort of "remote" So I've not really gotten the chance to put it through it's paces yet.