From: | Adrian Klaver <aklaver(at)comcast(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | Josef Wolf <jw(at)raven(dot)inka(dot)de> |
Subject: | Re: pg_ctl with unix domain socket? |
Date: | 2009-09-01 13:34:21 |
Message-ID: | 200909010634.22466.aklaver@comcast.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tuesday 01 September 2009 4:28:22 am Josef Wolf wrote:
> Hello,
>
> I have created a fresh cluster with
>
> initdb -D /some/path/pgtest
>
> I can start postgres to run on unix domain socket serving this cluster
> with:
>
> postgres -D /some/path/pgtest -h '' -k /some/path/pgtest
>
> But I'd like to use pg_ctl instead, in order to have clean control:
>
> PGPORT=/some/path/pgtest pg_ctl -D/some/path/pgtest -l postgreslog start
>
>
> Any hints how to use pg_ctl to start/stop postgresql on a unix domain
> socket?
1) In postgresql.conf make listen_addresses empty per instructions:
http://www.postgresql.org/docs/8.4/interactive/runtime-config-connection.html#GUC-LISTEN-ADDRESSES
listen_addresses (string)
Specifies the TCP/IP address(es) on which the server is to listen for
connections from client applications. The value takes the form of a
comma-separated list of host names and/or numeric IP addresses. The special
entry * corresponds to all available IP interfaces. If the list is empty, the
server does not listen on any IP interface at all, in which case only
Unix-domain sockets can be used to connect to it. The default value is
localhost, which allows only local "loopback" connections to be made. This
parameter can only be set at server start.
2) Use the -o switch to pass commands to postgres. See below:
http://www.postgresql.org/docs/8.4/interactive/app-pg-ctl.html
-o options
Specifies options to be passed directly to the postgres command.
The options are usually surrounded by single or double quotes to ensure that
they are passed through as a group.
--
Adrian Klaver
aklaver(at)comcast(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Glaesemann | 2009-09-01 13:38:34 | Re: Keys and indexes |
Previous Message | Daniel Verite | 2009-09-01 13:33:33 | Re: pg_ctl with unix domain socket? |