Thread: how to restart on OS X

how to restart on OS X

From
Victor Spång Arthursson
Date:
Have an installation which comes from Marks site entropy.cz.

But I can't restart the server.

Error message:

[indigo:~] victor% sudo /usr/local/bin/pg_ctl reload
pg_ctl: no database directory or environment variable $PGDATA is
specified
Try 'pg_ctl --help' for more information.
[indigo:~] victor%

Please help!  ;)

Sincerely

Victor


Re: how to restart on OS X

From
Adam Witney
Date:

You need to specify where the installations data directory is

sudo /usr/local/bin/pg_ctl -D /path/to/data reload

For example, on my machine:

sudo -u pgsql /usr/local/bin/pg_ctl -D /usr/local/pgsql/data reload


Although you may have to do this as the postgres/pgsql user rather than root
(not sure about this part though)



> Have an installation which comes from Marks site entropy.cz.
>
> But I can't restart the server.
>
> Error message:
>
> [indigo:~] victor% sudo /usr/local/bin/pg_ctl reload
> pg_ctl: no database directory or environment variable $PGDATA is
> specified
> Try 'pg_ctl --help' for more information.
> [indigo:~] victor%
>
> Please help!  ;)
>
> Sincerely
>
> Victor
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend


Re: how to restart on OS X [solved]

From
Victor Spång Arthursson
Date:
>
>> Have an installation which comes from Marks site entropy.cz.
>>
>> But I can't restart the server.
>>
>> Error message:
>>
>> [indigo:~] victor% sudo /usr/local/bin/pg_ctl reload
>> pg_ctl: no database directory or environment variable $PGDATA is
>> specified
>> Try 'pg_ctl --help' for more information.
>> [indigo:~] victor%
>>
>> Please help!  ;)
>>
>> Sincerely
>>
>> Victor

The following solved it:

sudo /usr/local/bin/pg_ctl reload -m immediate -D /usr/local/pgsql/data/

Sincerely

Victor