Hi Iuri,
Did you follow the first instructions on this page:
https://openacs.org/xowiki/en/How_to_install_in_Postgres_8%2e1%2ex
Specifically, you need to edit some parameters in postgresql.conf and then restart PG.
You'll then have to drop your DB and recreate it and then retry the install.