On Thu, 26 Jul 2001 23:47:34 +0000 (UTC), Mike C <mike@stonebow.otago.ac.nz>:
> Hi,
>
>>You must specify the directory that contains the database system either by specifying the -D >invocation option or by
settingthe PGDATA environment variable.
>
> Where can I set this variable so I don't get this message all the time. I did type
>
> [localhost:/usr/local] postgres% postmaster -D /usr/local/pgsql/data but got this message:
> Lock file "/usr/local/pgsql/data/postmaster.pid" already exists.
> --
You would set the PGDATA variable in your shell initialization file
(might be .cshrc or .profile for instance) see the documentation for
your shell on how to set the variable.
If you are absolutely sure that there is not another postmaster
still running you can remove the postmaster.pid file
The file may have been left there if you killed the postmaster
without shutting down properly (like if the power went out on
your computer.)