Re: starting postgresql for first time

From: Avi Schwartz <avi(at)CFFtechnologies(dot)com>
To: postgres <pgsql-novice(at)postgresql(dot)org>
Subject: Re: starting postgresql for first time
Date: 2004-04-29 04:30:29
Message-ID: F1F846B3-9995-11D8-9B49-000393AE5044@CFFtechnologies.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


On Apr 28, 2004, at 18:30, Robert Morgan wrote:

> INITIALISATION IS SUCCESSFUL
>
> bash-2.05b$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
> LOG: could not create IPv6 socket: Address family not supported by
> protocol
> LOG: database system was shut down at 2004-04-29 10:51:19 NZST
> LOG: checkpoint record is at 0/9B1058
> LOG: redo record is at 0/9B1058; undo record is at 0/0; shutdown TRUE
> LOG: next transaction ID: 536; next OID: 17142
> LOG: database system is ready
>
> AT THIS POINT I DID CTRL+Z AS NOTHING ELSE HAPPENED
>
> [1]+ Stopped /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
>
> POSMASTER HAS STOPPED
>
> bash-2.05b$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
> FATAL: lock file "/usr/local/pgsql/data/postmaster.pid" already exists
> HINT: Is another postmaster (PID 19495) running in data directory
> "/usr/local/pgsql/data"?
> bash-2.05b$
>
> UNABLE TO RESTART? ANOTHER INSTANCE OF POSTMASTER RUNNING? NO!!
>
> If someone could explain to me what is going on I would appreciate it.
>
> Without a doubt one of the more user unfriendly programmes I have come
> across!

You may look first for a book explaining basic Linux and bash concepts.

From the bash man page:

"Typing the ****suspend**** character (typically ^Z, Control-Z) while a
process is running causes that process to
be stopped and returns control to bash."

This does not kill the process. The process is still alive but
suspended and can be restarted either by the 'bg' or 'fg' job control
commands. This means that the lock files are still there and Postgres
is right, there is another postmaster instance running.

Avi

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message joseph speigle 2004-04-29 04:32:42 Re: starting postgresql for first time
Previous Message Tom Lane 2004-04-29 04:25:49 Re: starting postgresql for first time