As far as I know there's no absolute rule. It also depends on the rigidity of the various parts. A solid steel peg in a block reaches full strength sooner than a wooden peg or thin walled tube would. I use 2 diameters, or 1 diameter below the bottom of the top tube (which ever is deeper) as my rule of thumb minimum, and it's served me well for years.
If we look at an analogous situation, the insertion of the fork's steerer into a stem, we see that they work with even less overlap, somewhere in the range of 1-1/2 diameters.
Years ago, I read an engineering analysis that discussed this, but I couldn't find it at a free source this evening.
__________________
FB
Chain-L site
An ounce of diagnosis is worth a pound of cure.
Just because I'm tired of arguing, doesn't mean you're right.
“One accurate measurement is worth a thousand expert opinions” - Adm Grace Murray Hopper - USN
WARNING, I'm from New York. Thin skinned people should maintain safe distance.