In today’s “I finally unpacked my 3D printer” news, I printed some pegs for a coat rack to replace the original pegs that we lost during a cross-country move.
The base of each peg is flared to ensure a tight fit into the hole, but it also has a hole in the bottom to allow it to be attached with screws. (A screw could also be added to expand the base and tighten the fit, even if it’s not necessary to keep the peg attached.)
The OpenSCAD script is available at GitHub, or you can customize it on Thingiverse.