We invested in a king, a real one (not a California King) when I was pregnant with number 2. Lifesaver, both for bedsharing while pregnant and for bedsharing with 2 kids after baby came.
My husband never would let us put the mattress on the floor, although I think that is the safest option. Instead we have a low bed (just a frame.) We used a detachable mesh style bed rail until I became concerned baby could/would crawl over it or around it without waking me. I forget at what age this was but somewhere after 8 months probably? Close to a year I think. Every kid is different in nighttime shenanigans, luckily mine have seemed to prefer snuggling into me than flopping away and off bed or night wandering. Anyway, by then we had moved older sibling to his own room and baby was large enough/old enough we personally felt fine having baby in between us in the middle of the bed.