Re: createdb errors and more

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Reno Bladergroen <reno(dot)bladergroen(at)telenet(dot)be>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: createdb errors and more
Date: 2009-11-16 18:39:58
Message-ID: 23655.1258396798@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Reno Bladergroen <reno(dot)bladergroen(at)telenet(dot)be> writes:
> I have two xubuntu logins: a "superuser" and postgres. The latter one is a user with basic privileges.
> I installed pgsql according to the manual, generated a data folder, changed ownership to postgres, switched user postgres and initialized the database. starting the database is also successful (status says running).
> But now: when I use the command createdb test, I get the error "can't connect to database postgres: could not connect to server: no such file or directory, Is the server running locally and accepting .... etc."
> When I switch user back to "superuser" I can start the server, add users etc. in pgAdmin3. But I need to be able to do this from the command line.

Stop the postmaster so that createdb fails for both logins, and compare
the error messages --- are they pointing to the same socket file? I
suspect JD's diagnosis is right: you probably have got two postgres
installations (or parts of two at least) with different ideas of where
the communication socket should be.

> When I reboot, the database is not automatically started.

"man chkconfig" might help you with this one. Linux systems are not
normally made to auto-start services unless they're very specifically
requested.

By and large, it's a lot less painful to use a preconfigured package
than to try to install from source.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sebastian Feher 2009-11-16 18:40:43 Update on Insert
Previous Message SebiF 2009-11-16 18:31:05 Update on Insert