The 545 floor socket with cap is the fitting to use for removable railing and queueing posts. It is designed to hold 2" round tube and has a receiving space that is just over 2" in inside diameter to receive the tube. It is available in brass and 304 grade stainless steel and is mounted into the ground - typically core drilled into concrete. This item includes a cap to close the opening when there is no post in place.
Consult local building codes for rail height, wall offset and other requirements.