You usually put 1/3 in the ground so you may need longer uprights as it will be about 6 feet high. You may get away with less but depends on the design and ground
I did mine last year with 3m solid oak uprights. I put approx 2ft into the ground. With the way the ground slopes, to maintain a level top I have between 6ft and 8ft above ground.
I have clay soil and I used post cement to fix the uprights. Been in a year now and not moved