Post that we use on pergola and gazebo are standard 6×6 in pressure treated. As code, they will go into the ground 4’ft deep below the surface, or they would be installed on some sort of ankoring system, be it a helical pile or a concrete sonotube that is 4’ft deep with a saddle footing