A very simple way to extend posts is to just butt both ends together then put a wooden plate either side of the join use a waterproof wood glue and screws or ring grip nails. It does not look very pretty but it is strong, often it is possible to place the join somewhere where it won't show or you can disguise it sometimes.
Another simple way is to butt join as above but use 2 metal plates either side instead of the wood, again not pretty but strong and can be disguised.
Or you could use a (tapered) scarf joint with strong screws or bolts or simply lap two uprights together and use bolts to join.
None of the above are pretty but if hidden or disguised are strong.