Re: createdb errors and more - Mailing list pgsql-general

From Tom Lane
Subject Re: createdb errors and more
Date
Msg-id 23655.1258396798@sss.pgh.pa.us
Whole thread Raw
In response to createdb errors and more  (Reno Bladergroen <reno.bladergroen@telenet.be>)
Responses Re: createdb errors and more  (Reno Bladergroen <reno.bladergroen@telenet.be>)
List pgsql-general
Reno Bladergroen <reno.bladergroen@telenet.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
postgresand 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
toserver: 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
dothis 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

pgsql-general by date:

Previous
From: Raymond Rodgers
Date:
Subject: Need full search text on a shared hosting web site using 8.1.x
Next
From: Tom Lane
Date:
Subject: Re: Need full search text on a shared hosting web site using 8.1.x