After a couple of hours fighting, I finally went through a way to compile documentation of postgres under Ubuntu Lucid.
For man pages and html, you need the following packages.
Then, before running configure, the following setup is necessary:
Compilation of html pages need the following command in doc/src/sgml:
Result is then found in doc/src/sgml/html.
Compilation of man pages need the following command in doc/src/sgml:
Result is then found in doc/src/sgml/manX. X being 1, 3 or 7.
Then when compiling the code for pdf documentation, the following package is required.
Be aware that this had dependencies with tex, and several packages.
Compilation of pdf is done with the following command:
However, pdf compilation still shows issues due to incorrect parameters in /etc/texmf/texmf.cnf.
hash_extra = 50000
hash_size.mpost = 120000