Thread: Postmaster not starting

Postmaster not starting

From
Egon Schmid
Date:
Hi Bruce,
some great steps forward. Actually postgres is called from postmaster
and display's the usage() from postgres. I have compared it with older
version's but can't see anything strange here.

Postgres itself runs if called with a database. BTW how should I stop
it. I have tried stop, exit, bye, quit, and halt.  ^C worked!

marliesle# su - postgres
marliesle$ postmaster -i 2>&1 &
[1] 15187
marliesle$ Usage: /usr/local/pgsql/bin/postgres [options] [dbname]
    -B buffers    set number of buffers in buffer pool
    -C         supress version info
    -D dir        data directory
    -E         echo query before execution
    -F         turn off fsync
    -P port        set port file descriptor
    -Q         suppress informational messages
    -S buffers    set amount of sort memory available
    -d [1|2|3]    set debug level
    -e         turn on European date format
    -o file        send stdout and stderr to given filename
    -s         show stats after each query
    -v version    set protocol version being used by frontend
[1]+  Exit 1                  postmaster -i 2>&1

-Egon

Re: [HACKERS] Postmaster not starting

From
The Hermit Hacker
Date:
On Tue, 9 Jun 1998, Egon Schmid wrote:

> Hi Bruce,
> some great steps forward. Actually postgres is called from postmaster
> and display's the usage() from postgres. I have compared it with older
> version's but can't see anything strange here.
>
> Postgres itself runs if called with a database. BTW how should I stop
> it. I have tried stop, exit, bye, quit, and halt.  ^C worked!
>
> marliesle# su - postgres
> marliesle$ postmaster -i 2>&1 &
> [1] 15187
> marliesle$ Usage: /usr/local/pgsql/bin/postgres [options] [dbname]
>     -B buffers    set number of buffers in buffer pool
>     -C         supress version info
>     -D dir        data directory
>     -E         echo query before execution
>     -F         turn off fsync
>     -P port        set port file descriptor
>     -Q         suppress informational messages
>     -S buffers    set amount of sort memory available
>     -d [1|2|3]    set debug level
>     -e         turn on European date format
>     -o file        send stdout and stderr to given filename
>     -s         show stats after each query
>     -v version    set protocol version being used by frontend
> [1]+  Exit 1                  postmaster -i 2>&1

I start mine up with something like:

#!/bin/tcsh
setenv HOMEDIR /home/db
${HOMEDIR}/bin/postmaster -o "-F -o ${HOMEDIR}/errout" \
    -i -p 5000 -D${HOMEDIR}/data &

First thing I'd try is adding the -D<dir> switch so that postmaster knows
where your databases are...



Re: [HACKERS] Postmaster not starting

From
Egon Schmid
Date:
I added '-D /usr/local/pgsql/data' my first time I ever know.  It worked!
But this means that the environment variables (PGDATA) are ignored.  The
version I took was from 5:30am GMT (after Bruce's commit's to
postmaster.c).

-Egon

On Tue, 9 Jun 1998, The Hermit Hacker wrote:
> I start mine up with something like:
>
> #!/bin/tcsh
> setenv HOMEDIR /home/db
> ${HOMEDIR}/bin/postmaster -o "-F -o ${HOMEDIR}/errout" \
>     -i -p 5000 -D${HOMEDIR}/data &
>
> First thing I'd try is adding the -D<dir> switch so that postmaster knows
> where your databases are...


Re: [HACKERS] Postmaster not starting

From
Bruce Momjian
Date:
>
> On Tue, 9 Jun 1998, Egon Schmid wrote:
>
> > Hi Bruce,
> > some great steps forward. Actually postgres is called from postmaster
> > and display's the usage() from postgres. I have compared it with older
> > version's but can't see anything strange here.
> >
> > Postgres itself runs if called with a database. BTW how should I stop
> > it. I have tried stop, exit, bye, quit, and halt.  ^C worked!
> >
> > marliesle# su - postgres
> > marliesle$ postmaster -i 2>&1 &
> > [1] 15187
> > marliesle$ Usage: /usr/local/pgsql/bin/postgres [options] [dbname]
> >     -B buffers    set number of buffers in buffer pool
> >     -C         supress version info
> >     -D dir        data directory
> >     -E         echo query before execution
> >     -F         turn off fsync
> >     -P port        set port file descriptor
> >     -Q         suppress informational messages
> >     -S buffers    set amount of sort memory available
> >     -d [1|2|3]    set debug level
> >     -e         turn on European date format
> >     -o file        send stdout and stderr to given filename
> >     -s         show stats after each query
> >     -v version    set protocol version being used by frontend
> > [1]+  Exit 1                  postmaster -i 2>&1

OK, I now realize it is still broken.  Working on it now.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Re: [HACKERS] Postmaster not starting

From
Bruce Momjian
Date:
>
> On Tue, 9 Jun 1998, Egon Schmid wrote:
>
> > Hi Bruce,
> > some great steps forward. Actually postgres is called from postmaster
> > and display's the usage() from postgres. I have compared it with older
> > version's but can't see anything strange here.
> >
> > Postgres itself runs if called with a database. BTW how should I stop
> > it. I have tried stop, exit, bye, quit, and halt.  ^C worked!
> >
> > marliesle# su - postgres
> > marliesle$ postmaster -i 2>&1 &
> > [1] 15187
> > marliesle$ Usage: /usr/local/pgsql/bin/postgres [options] [dbname]
> >     -B buffers    set number of buffers in buffer pool
> >     -C         supress version info
> >     -D dir        data directory
> >     -E         echo query before execution
> >     -F         turn off fsync
> >     -P port        set port file descriptor
> >     -Q         suppress informational messages
> >     -S buffers    set amount of sort memory available
> >     -d [1|2|3]    set debug level
> >     -e         turn on European date format
> >     -o file        send stdout and stderr to given filename
> >     -s         show stats after each query
> >     -v version    set protocol version being used by frontend
> > [1]+  Exit 1                  postmaster -i 2>&1
>
> I start mine up with something like:

OK, I have just made another fix for this.  I missed some of the
handling I needed.  Please try again.  Thanks.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Re: [HACKERS] Postmaster not starting

From
Bruce Momjian
Date:
>
> I added '-D /usr/local/pgsql/data' my first time I ever know.  It worked!
> But this means that the environment variables (PGDATA) are ignored.  The
> version I took was from 5:30am GMT (after Bruce's commit's to
> postmaster.c).
>

Still, the problem was that the exec() with three args fix was broken
because it was exec'ing postgres, not postmaster.  Fixed now.  It worked
because your addition of -D dir added the needed three args.

It will work properly now.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)