Обсуждение: starting/running postgres...

Поиск
Список
Период
Сортировка

starting/running postgres...

От
"bruce"
Дата:
hi.

i'm installing postgres and have a few questions... i can login/su as the
user 'postgres' and then 'postmaster -i -p 5432 -D /var/lib/psql/data/'.
this starts the postgres app, and i can access it from a website.

however, if i attempt to do 'service postgresql start' while i'm 'root', the
postgres db/app still starts, but i'm unable to connect to it from the
website. the same thing occurs if i try to start the postgres app from the
'gnome' gui...

the website tries to access the db as user 'gforge'. this user is different
than the user 'postgres' or the user 'root'. as i said, this works if i
start postegres from the command line as user 'postgres'.

any ides/thoughts/etc...

thanks

bruce
bedouglas@earthlink.net

ps. im unable to use the 'services postgresql start' as user 'postgres'.



Re: starting/running postgres...

От
Michael Fuhr
Дата:
On Mon, Apr 25, 2005 at 03:09:11PM -0700, bruce wrote:
>
> i'm installing postgres and have a few questions... i can login/su as the
> user 'postgres' and then 'postmaster -i -p 5432 -D /var/lib/psql/data/'.
> this starts the postgres app, and i can access it from a website.
>
> however, if i attempt to do 'service postgresql start' while i'm 'root', the
> postgres db/app still starts, but i'm unable to connect to it from the
> website. the same thing occurs if i try to start the postgres app from the
> 'gnome' gui...

What error do you get when you try to connect?  What's different
between the two situations?  One possibility is that you're making
a TCP connection that succeeds in the first case because -i tells
the postmaster to listen for network connections, but fails in the
second case because the postmaster isn't started with -i and
postgresql.conf isn't configured for network connections.  You could
check this with netstat, lsof, etc.

What version of PostgreSQL are you using?  In 8.0 look at the
listen_addresses setting in postgresql.conf; in 7.4 and earlier
look at tcpip_socket and virtual_host.  In any version see also the
port setting.  If you change postgresql.conf, be sure to restart
the postmaster.

For more information about postgresql.conf, see "Run-time Configuration"
in the "Server Run-time Environment" chapter of the documentation.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Re: starting/running postgres...

От
Michael Fuhr
Дата:
[Please copy the mailing list on replies so others can contribute
to and learn from discussions.]

On Mon, Apr 25, 2005 at 06:39:20PM -0700, bruce wrote:
>
> i do have a question though. short of modifying the init.d/postgresql file
> with the "-i" option, is there another better way to resolve the issue...

If that is indeed the problem then edit postgresql.conf and change
the appropriate settings (see my previous message for the names of
settings to look at).  Here are links to the relevant sections in
the 8.0 and 7.4 documentation; if you're using a different version
then see that version's documentation.

http://www.postgresql.org/docs/8.0/interactive/runtime-config.html
http://www.postgresql.org/docs/7.4/interactive/runtime-config.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/