From what point is the hydrostatic pressure formula not valid anymore? The hydrostatic pressure formula (P=p.g.h) is used (eg) to calculate the pressure at the bottom of a container. Now this pressure is equal independent of the mass in it as long as the bottum surface is equal. This is because it depends on the local equilibrium of forces, it cannot depend on what's going on far in other parts of the container. The extra mass is contained by the vertical walls of a container. See Why the pressure in liquids only depends on the height?
Now often this is demonstrated with water(molecules). But how big can these molecules become to keep the formula valid for it. In the following (poor) picture are the 'molecules' touched by two other molecules. So the force on it would be higher on the bottumsurface. In this picture however I have exagerated the shape of the molecules and the walls aren't uses. But imagine a substance that touches the walls (like watermolecules do) but the also have a slightly other shape. To what shape/size is this formula valid. Or could even a substance with tennisballs have the same effect?
 A: I think you are mixing solids, liquids and granular matter.  Your question seems about granular matter (sand, wheat, etc) where the grains/particles/molecules are fixed and form pyramids like your drawing. Hydrostatic pressure here is VERY difficult to calculate and depends on particle shape, friction, etc.
In liquids like water, molecules are MOVING all the time, so do not form structures like your drawing (they form structures, but they change rapidly due to thermal motion). You can imagine water molecules as "extremely slippery balls".
Water molecules in liquid state do not make any net vertical force on the wall, because they're very slippery.
Molecules can be as big as you want, granted that the thermal agitation prevent them from sticking. You can make a "fluidized bed" with tennis balls or steel cubes
 and they will behave like a perfect liquid.
Even with object as large as stars, fluid models work well. 
In very small tubes (few water molecules in diameter) I guess we cannot consider water as a liquid and interaction with the walls will be significant, as from your intuition.
But very small! A glass of water is enormous.
