Thread: unable starting / stopping postgresql with pgAdmin III on OS X

unable starting / stopping postgresql with pgAdmin III on OS X

From
Georges Moes
Date:
I've tried to activate the start / stop option for the postgresql 
service in pgAdmin III on my Snow Leopard Installation. The PostgreSQL 
Version is 8.4.
I can start the service via terminal with:
geo-mbp:~ gm$ sudo su postgres
bash-3.2$ /Library/PostgreSQL/8.4/bin/pg_ctl -D 
/Library/PostgreSQL/8.4/data start
server starting
bash-3.2$ /Library/PostgreSQL/8.4/bin/pg_ctl -D 
/Library/PostgreSQL/8.4/data stop -m fast
waiting for server to shut down.... done
server stopped

How can i use these commands in the GUI of pgAdmin III to start and stop 
the service? I've tried the following and a few other things with no 
success in the Properties pane under service:

sudo su postgres -c /Library/PostgreSQL/8.4/bin/pg_ctl -D 
/Library/PostgreSQL/8.4/data


What's wrong with that????

I've switched from Windows to OS X and would apreciate any help.

Thanks in advance





-- 
Georges Moes


Re: unable starting / stopping postgresql with pgAdmin III on OS X

From
Guillaume Lelarge
Date:
Le 28/12/2009 21:15, Georges Moes a écrit :
> I've tried to activate the start / stop option for the postgresql
> service in pgAdmin III on my Snow Leopard Installation. The PostgreSQL
> Version is 8.4.
> I can start the service via terminal with:
> geo-mbp:~ gm$ sudo su postgres
> bash-3.2$ /Library/PostgreSQL/8.4/bin/pg_ctl -D
> /Library/PostgreSQL/8.4/data start
> server starting
> bash-3.2$ /Library/PostgreSQL/8.4/bin/pg_ctl -D
> /Library/PostgreSQL/8.4/data stop -m fast
> waiting for server to shut down.... done
> server stopped
> 
> How can i use these commands in the GUI of pgAdmin III to start and stop
> the service? I've tried the following and a few other things with no
> success in the Properties pane under service:
> 
> sudo su postgres -c /Library/PostgreSQL/8.4/bin/pg_ctl -D
> /Library/PostgreSQL/8.4/data
> 
> 
> What's wrong with that????
> 

The service field is only useful on Windows. What you want is not a
feature pgAdmin has on other platforms.


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


Re: unable starting / stopping postgresql with pgAdmin III on OS X

From
Dave Page
Date:
On Mon, Dec 28, 2009 at 8:37 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Le 28/12/2009 21:15, Georges Moes a écrit :
>> I've tried to activate the start / stop option for the postgresql
>> service in pgAdmin III on my Snow Leopard Installation. The PostgreSQL
>> Version is 8.4.
>> I can start the service via terminal with:
>> geo-mbp:~ gm$ sudo su postgres
>> bash-3.2$ /Library/PostgreSQL/8.4/bin/pg_ctl -D
>> /Library/PostgreSQL/8.4/data start
>> server starting
>> bash-3.2$ /Library/PostgreSQL/8.4/bin/pg_ctl -D
>> /Library/PostgreSQL/8.4/data stop -m fast
>> waiting for server to shut down.... done
>> server stopped
>>
>> How can i use these commands in the GUI of pgAdmin III to start and stop
>> the service? I've tried the following and a few other things with no
>> success in the Properties pane under service:
>>
>> sudo su postgres -c /Library/PostgreSQL/8.4/bin/pg_ctl -D
>> /Library/PostgreSQL/8.4/data
>>
>>
>> What's wrong with that????
>>
>
> The service field is only useful on Windows. What you want is not a
> feature pgAdmin has on other platforms.

Yes it does - but you'd need to play with the command to get it to
work right - I've never really tried it on the Mac. One thing you'll
certainly need to do is to configure sudo to not ask for a password
for the commands you use.

From the docs:

=====
The service field specifies parameters to control the database service
process. Its meaning is operating system dependent.

If pgAdmin is running on a Windows machine, it can control the
postmaster service if you have enough access rights. Enter the name of
the service. In case of a remote server, it must be prepended by the
machine name (e.g. PSE1\pgsql-8.0). pgAdmin will automatically
discover services running on your local machine.

If pgAdmin is running on a Unix machine, it can control processes
running on the local machine if you have enough access rights. Enter a
full path and needed options to access the pg_ctl program. When
executing service control functions, pgAdmin will append
status/start/stop keywords to this. Example:
sudo /usr/local/pgsql/bin/pg_ctl -D /data/pgsql
=====

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com


Re: unable starting / stopping postgresql with pgAdmin III on OS X

From
Georges Moes
Date:
I just refered to the help-file of pgAdmin III.
Under 'Connect to server' I've found the following description:

If pgAdmin is running on a Windows machine, it can control the 
postmaster service if you have enough access rights. Enter the name of 
the service. In case of a remote server, it must be prepended by the 
machine name (e.g. PSE1\pgsql-8.0). pgAdmin will automatically discover 
services running on your local machine.

If pgAdmin is running on a Unix machine, it can control processes 
running on the local machine if you have enough access rights. Enter a 
full path and needed options to access the pg_ctl program. When 
executing service control functions, pgAdmin will append 
status/start/stop keywords to this. Example:
sudo /usr/local/pgsql/bin/pg_ctl -D /data/pgsql

It seems as if I misunderstood that?

If OS X doesn't support that, it would be nice to introduce that in the 
future.


Thanks

Georges Moes


Am 28.12.09 21:37, schrieb Guillaume Lelarge:
> Le 28/12/2009 21:15, Georges Moes a écrit :
>> I've tried to activate the start / stop option for the postgresql
>> service in pgAdmin III on my Snow Leopard Installation. The PostgreSQL
>> Version is 8.4.
>> I can start the service via terminal with:
>> geo-mbp:~ gm$ sudo su postgres
>> bash-3.2$ /Library/PostgreSQL/8.4/bin/pg_ctl -D
>> /Library/PostgreSQL/8.4/data start
>> server starting
>> bash-3.2$ /Library/PostgreSQL/8.4/bin/pg_ctl -D
>> /Library/PostgreSQL/8.4/data stop -m fast
>> waiting for server to shut down.... done
>> server stopped
>>
>> How can i use these commands in the GUI of pgAdmin III to start and stop
>> the service? I've tried the following and a few other things with no
>> success in the Properties pane under service:
>>
>> sudo su postgres -c /Library/PostgreSQL/8.4/bin/pg_ctl -D
>> /Library/PostgreSQL/8.4/data
>>
>>
>> What's wrong with that????
>>
>
> The service field is only useful on Windows. What you want is not a
> feature pgAdmin has on other platforms.
>
>




Am 28.12.09 21:37, schrieb Guillaume Lelarge:
> Le 28/12/2009 21:15, Georges Moes a écrit :
>> I've tried to activate the start / stop option for the postgresql
>> service in pgAdmin III on my Snow Leopard Installation. The PostgreSQL
>> Version is 8.4.
>> I can start the service via terminal with:
>> geo-mbp:~ gm$ sudo su postgres
>> bash-3.2$ /Library/PostgreSQL/8.4/bin/pg_ctl -D
>> /Library/PostgreSQL/8.4/data start
>> server starting
>> bash-3.2$ /Library/PostgreSQL/8.4/bin/pg_ctl -D
>> /Library/PostgreSQL/8.4/data stop -m fast
>> waiting for server to shut down.... done
>> server stopped
>>
>> How can i use these commands in the GUI of pgAdmin III to start and stop
>> the service? I've tried the following and a few other things with no
>> success in the Properties pane under service:
>>
>> sudo su postgres -c /Library/PostgreSQL/8.4/bin/pg_ctl -D
>> /Library/PostgreSQL/8.4/data
>>
>>
>> What's wrong with that????
>>
>
> The service field is only useful on Windows. What you want is not a
> feature pgAdmin has on other platforms.
>
>


Re: unable starting / stopping postgresql with pgAdmin III on OS X

From
Guillaume Lelarge
Date:
Le 28/12/2009 21:54, Georges Moes a écrit :
> I just refered to the help-file of pgAdmin III.
> Under 'Connect to server' I've found the following description:
> 
> If pgAdmin is running on a Windows machine, it can control the
> postmaster service if you have enough access rights. Enter the name of
> the service. In case of a remote server, it must be prepended by the
> machine name (e.g. PSE1\pgsql-8.0). pgAdmin will automatically discover
> services running on your local machine.
> 
> If pgAdmin is running on a Unix machine, it can control processes
> running on the local machine if you have enough access rights. Enter a
> full path and needed options to access the pg_ctl program. When
> executing service control functions, pgAdmin will append
> status/start/stop keywords to this. Example:
> sudo /usr/local/pgsql/bin/pg_ctl -D /data/pgsql
> 
> It seems as if I misunderstood that?
> 

No, I did. I didn't remember pgAdmin could do that. Sorry about this.

You should follow Dave's advice; there's a probably something to
configure with sudo.


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com