Thread: Postmaster hangs until Ctrl-C

Postmaster hangs until Ctrl-C

From
"Tom Brown"
Date:
When I run postmaster, the system hangs until I Ctrl-C.
 
Postgresql 6.4 was installed at the factory by the manufacturer (VA Linux) with root ownership and permissions. I read the FAQ and Admin manual re installation. There was no postgres user although VA did create a postgres group. I created a postgres user, changed ownership on as many directories as I can find with postgresql files, and I edited the pg_hba.conf file to reflect the instructions in the Admin install manual. It doesn't matter whether I su - postgres to start postmaster or not -- it still hangs. Apparently I've missed something.
 
Tom

RE: Postmaster hangs until Ctrl-C

From
"Picard, Cyril"
Date:
Do you run postmaster in background ?
i.e. postmaster &

Cyril

> -----Message d'origine-----
> De:    Tom Brown [SMTP:tbrown@hwwe.com]
> Date:    jeudi 5 avril 2001 18:04
> À:    pgsql-novice list
> Objet:    [NOVICE] Postmaster hangs until Ctrl-C
>
> When I run postmaster, the system hangs until I Ctrl-C.
>
> Postgresql 6.4 was installed at the factory by the manufacturer (VA Linux)
> with root ownership and permissions. I read the FAQ and Admin manual re
> installation. There was no postgres user although VA did create a postgres
> group. I created a postgres user, changed ownership on as many directories
> as I can find with postgresql files, and I edited the pg_hba.conf file to
> reflect the instructions in the Admin install manual. It doesn't matter
> whether I su - postgres to start postmaster or not -- it still hangs.
> Apparently I've missed something.
>
> Tom

Re: Postmaster hangs until Ctrl-C

From
Tom Lane
Date:
"Tom Brown" <tbrown@hwwe.com> writes:
> When I run postmaster, the system hangs until I Ctrl-C.

Sounds like you're just saying
    postmaster
and not doing anything to put the process into the background.  See
http://www.postgresql.org/devel-corner/docs/postgres/postmaster-start.html

            regards, tom lane

Re: Postmaster hangs until Ctrl-C

From
"Bryan White"
Date:
> When I run postmaster, the system hangs until I Ctrl-C.

> Postgresql 6.4 was installed at the factory by the manufacturer (VA Linux)
with root ownership and permissions. I read the FAQ and Admin manual re
installation. There was no postgres user although VA did create a postgres
group. I created a postgres user, changed ownership on as many directories
as I can find with postgresql files, and I edited the pg_hba.conf file to
reflect the instructions in the Admin install manual. It doesn't matter
whether I su - postgres to start postmaster or not -- it still hangs.
Apparently I've missed something.

Yikes, 6.4 is ancient.  I strongly suggest upgrading.

Anyway the postmaster runs until it stops.  If you run it in the foreground
then it will stay connected to the tty and you will most likely see log file
output on that tty.  It should normally be run in the background with its
output redirected somewhere useful.  You normally want to do this in a
system boot up script somewhere.  There are example scripts in the source
distribution.


Re: Postmaster hangs until Ctrl-C

From
"Tom Brown"
Date:
I was certain that I had already taken care of the proper environmental
variables (PGLIB, PGDATA) and that I should be able to start postmaster in
the foreground or background. But I tried your suggestion anyway. By
starting postmaster in the background it revealed an error I hadn't
considered -- postmaster couldn't find PGDATA in spite of the correct
.bash_profile.

I checked the current $PATH variable and found that it didn't include
/home/postgres/bin. I had logged in as tbrown and su'd to postgres which
kept /home/tbrown/bin in the path as $HOME. I exited and logged in again as
postgres. Then postmaster worked. The $HOME and $PATH environmental
variables were /home/postgres/bin and /usr/loca/pgsql/data as expected.

Thanks for the reply. It helped.

Tom


----- Original Message -----
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tom Brown <tbrown@hwwe.com>
Cc: pgsql-novice list <pgsql-novice@postgresql.org>
Sent: Thursday, April 05, 2001 11:09 AM
Subject: Re: [NOVICE] Postmaster hangs until Ctrl-C


> "Tom Brown" <tbrown@hwwe.com> writes:
> > When I run postmaster, the system hangs until I Ctrl-C.
>
> Sounds like you're just saying
> postmaster
> and not doing anything to put the process into the background.  See
> http://www.postgresql.org/devel-corner/docs/postgres/postmaster-start.html
>
> regards, tom lane
>