"Allan C. Lemos" wrote:
>
> Hi,
> I'm running FreeBSD 2.8 and I downloaded and installed PostgreSQL 6.4. I
> can start postmaster (-i), but when I try to run createdb, to create a
> database, I get a output saying:
> Connection to database 'template1' failed.
> pqReadData() --backend closed the channel unexpectedly.
> This probably means the backend terminated abnormally before or while
> processing the request.
> createdb: database creation failed on userxx
Sounds like you havn't run "initdb" yet.