Lists: | pgsql-general |
---|
From: | "Markova, Nina" <nmarkova(at)NRCan(dot)gc(dot)ca> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | setting Postgres client |
Date: | 2008-09-19 13:59:58 |
Message-ID: | 6D8C7E015447D0428D80E9DBABA06A1E04013A90@S0-OTT-X2.nrn.nrcan.gc.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
My message didn't get through the 1st time.
-----Original Message-----
From: Markova, Nina
Sent: September 17, 2008 17:33
To: pgsql-general(at)postgresql(dot)org
Subject: Help on setting Postgres client
I have setup a Postgres server (8.2.4) on Solaris 10, for now in the
global zone, with FS :
/pg_db
/pg_log
/pg_data
Now I need to set up a client in a non-global zone on the same machine
or on anoter machine.
Not much luck so far.
What I did:
===========
- on the server in $PGDATA/pg_hub.conf I added a line for the client
host all all 192.XXX.XX.XXX trust
- On the client I tried:
psql sta
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
In my understanding:
- the data and the log file should exist on the server only.
- I should have postgres configuration file somewhere on the client to
at least specify Postgres server ip (PGHOSTTADDR and/or PGHOST), or this
should be set different way?
Questions:
==========
- where to find steps for setting up postgres client?
- what directories and files should I have on the client side?
- should I have local log file on the client?
- how to start postgres on the client - should I specify $PGDATA?
- Should $PGDATA be shared, i.e. mounted by the client, or I have choice
not to? I actually prefer not to be mounted.
- I read that for the client side I should have only 2 of the packages -
SUNWpostgr-libs and SUNWpostgr. All 24 packges for postgres are there -
should I remove the rest?
- where to specify PGHOSTTADDR and/or PGHOST?
Thanks in advance,
Nina
Any practical advices
From: | Bill Moran <wmoran(at)collaborativefusion(dot)com> |
---|---|
To: | "Markova, Nina" <nmarkova(at)NRCan(dot)gc(dot)ca> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: setting Postgres client |
Date: | 2008-09-19 14:41:37 |
Message-ID: | 20080919104137.5afc51ab.wmoran@collaborativefusion.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
"Markova, Nina" <nmarkova(at)NRCan(dot)gc(dot)ca> wrote:
>
> - On the client I tried:
> psql sta
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
The client tries to connect to the unix domain socket by default (as
can be seen by the error message)
If your client system and server don't share the same /tmp filesystem,
then that is going to fail, which is expected. Either specify the
IP address/hostname you want to connect to with -h or put options in
your .psqlrc file or set appropriate environment variables. More
details here:
http://www.postgresql.org/docs/8.2/static/app-psql.html
--
Bill Moran
Collaborative Fusion Inc.
wmoran(at)collaborativefusion(dot)com
Phone: 412-422-3463x4023
From: | "Markova, Nina" <nmarkova(at)NRCan(dot)gc(dot)ca> |
---|---|
To: | "Richard Huxton" <dev(at)archonet(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: setting Postgres client |
Date: | 2008-09-19 14:49:58 |
Message-ID: | 6D8C7E015447D0428D80E9DBABA06A1E04013ACC@S0-OTT-X2.nrn.nrcan.gc.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Thanks Richard.
I specified the host IP ( I use the default 5432 port), got error:
psql: could not connect to server: Connection refused
Is the server running on host "192.168.XX.XXX" and accepting
TCP/IP connections on port 5432?
The only tcp lines in my postgres.conf are
#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
# 0 selects the system default
#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
# 0 selects the system default
#tcp_keepalives_count = 0 # TCP_KEEPCNT;
# 0 selects the system default
Should I change something here?
Nina
-----Original Message-----
From: Richard Huxton [mailto:dev(at)archonet(dot)com]
Sent: September 19, 2008 10:15
To: Markova, Nina
Subject: Re: [GENERAL] setting Postgres client
Markova, Nina wrote:
> Now I need to set up a client in a non-global zone on the same machine
> or on anoter machine.
> Not much luck so far.
>
>
> What I did:
> ===========
> - on the server in $PGDATA/pg_hub.conf I added a line for the client
> host all all 192.XXX.XX.XXX trust
>
> - On the client I tried:
> psql sta
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>
>
> In my understanding:
> - the data and the log file should exist on the server only.
> - I should have postgres configuration file somewhere on the client to
> at least specify Postgres server ip (PGHOSTTADDR and/or PGHOST), or
> this should be set different way?
You can provide a hostname on the command-line too "psql -h 192.168.1.2"
, in an environment variable or in a "connection service file". Without
that, it defaults to trying to connect by unix domain sockets (on unix)
which I'm guessing doesn't work because your server is in a different
zone. Try an explicit IP address, as above.
> Questions:
> ==========
> - where to find steps for setting up postgres client?
If it runs, it's set up.
> - what directories and files should I have on the client side?
none
> - should I have local log file on the client?
No. Well, you get a .psql_history file if you have readline enabled.
> - how to start postgres on the client - should I specify $PGDATA?
No
> - Should $PGDATA be shared, i.e. mounted by the client, or I have
> choice not to? I actually prefer not to be mounted.
No
> - I read that for the client side I should have only 2 of the packages
> - SUNWpostgr-libs and SUNWpostgr. All 24 packges for postgres are
> there - should I remove the rest?
Can't help sorry.
> - where to specify PGHOSTTADDR and/or PGHOST?
You can do it in your shell profile on a per-user basis, or for the
whole machine. I tend to do it no the command-line or in an shell alias
myself though.
--
Richard Huxton
Archonet Ltd
From: | Steve Clark <sclark(at)netwolves(dot)com> |
---|---|
To: | "Markova, Nina" <nmarkova(at)NRCan(dot)gc(dot)ca> |
Cc: | Richard Huxton <dev(at)archonet(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: setting Postgres client |
Date: | 2008-09-19 15:10:25 |
Message-ID: | 48D3C0E1.8050900@netwolves.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Markova, Nina wrote:
>
> Thanks Richard.
>
>
> I specified the host IP ( I use the default 5432 port), got error:
> psql: could not connect to server: Connection refused
> Is the server running on host "192.168.XX.XXX" and accepting
> TCP/IP connections on port 5432?
>
> The only tcp lines in my postgres.conf are
> #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
> # 0 selects the system default
> #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
> # 0 selects the system default
> #tcp_keepalives_count = 0 # TCP_KEEPCNT;
> # 0 selects the system default
> Should I change something here?
>
> Nina
>
> -----Original Message-----
> From: Richard Huxton [mailto:dev(at)archonet(dot)com]
> Sent: September 19, 2008 10:15
> To: Markova, Nina
> Subject: Re: [GENERAL] setting Postgres client
>
> Markova, Nina wrote:
>
>>Now I need to set up a client in a non-global zone on the same machine
>
>
>>or on anoter machine.
>>Not much luck so far.
>>
>>
>>What I did:
>>===========
>>- on the server in $PGDATA/pg_hub.conf I added a line for the client
>>host all all 192.XXX.XX.XXX trust
>>
>>- On the client I tried:
>>psql sta
>>psql: could not connect to server: No such file or directory
>> Is the server running locally and accepting
>> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>>
>>
>>In my understanding:
>>- the data and the log file should exist on the server only.
>>- I should have postgres configuration file somewhere on the client to
>
>
>>at least specify Postgres server ip (PGHOSTTADDR and/or PGHOST), or
>>this should be set different way?
>
>
> You can provide a hostname on the command-line too "psql -h 192.168.1.2"
> , in an environment variable or in a "connection service file". Without
> that, it defaults to trying to connect by unix domain sockets (on unix)
> which I'm guessing doesn't work because your server is in a different
> zone. Try an explicit IP address, as above.
>
>
>>Questions:
>>==========
>>- where to find steps for setting up postgres client?
>
>
> If it runs, it's set up.
>
>
>>- what directories and files should I have on the client side?
>
>
> none
>
>
>>- should I have local log file on the client?
>
>
> No. Well, you get a .psql_history file if you have readline enabled.
>
>
>>- how to start postgres on the client - should I specify $PGDATA?
>
>
> No
>
>
>>- Should $PGDATA be shared, i.e. mounted by the client, or I have
>>choice not to? I actually prefer not to be mounted.
>
>
> No
>
>
>>- I read that for the client side I should have only 2 of the packages
>
>
>>- SUNWpostgr-libs and SUNWpostgr. All 24 packges for postgres are
>>there - should I remove the rest?
>
>
> Can't help sorry.
>
>
>>- where to specify PGHOSTTADDR and/or PGHOST?
>
>
> You can do it in your shell profile on a per-user basis, or for the
> whole machine. I tend to do it no the command-line or in an shell alias
> myself though.
>
> --
> Richard Huxton
> Archonport = 5432 et Ltd
>
port = 5432
From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | "Markova, Nina" <nmarkova(at)NRCan(dot)gc(dot)ca> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: setting Postgres client |
Date: | 2008-09-19 15:56:46 |
Message-ID: | 48D3CBBE.9040801@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Markova, Nina wrote:
>
> Thanks Richard.
>
>
> I specified the host IP ( I use the default 5432 port), got error:
> psql: could not connect to server: Connection refused
> Is the server running on host "192.168.XX.XXX" and accepting
> TCP/IP connections on port 5432?
>
> The only tcp lines in my postgres.conf are
> #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
> # 0 selects the system default
> #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
> # 0 selects the system default
> #tcp_keepalives_count = 0 # TCP_KEEPCNT;
> # 0 selects the system default
> Should I change something here?
Check "listen_addresses" and "port" look OK. You're probably only
listening to localhost.
You can test by telnet-ing to port 5432 or using lsof / netstat to see
what connections you have open in that zone.
--
Richard Huxton
Archonet Ltd
From: | "Markova, Nina" <nmarkova(at)NRCan(dot)gc(dot)ca> |
---|---|
To: | "Richard Huxton" <dev(at)archonet(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: setting Postgres client |
Date: | 2008-09-19 16:50:39 |
Message-ID: | 6D8C7E015447D0428D80E9DBABA06A1E04013B51@S0-OTT-X2.nrn.nrcan.gc.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
YES! Done - my listen addresses was the default.
Thanks Richard!
Nina
-----Original Message-----
From: Richard Huxton [mailto:dev(at)archonet(dot)com]
Sent: September 19, 2008 11:57
To: Markova, Nina
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] setting Postgres client
Markova, Nina wrote:
>
> Thanks Richard.
>
>
> I specified the host IP ( I use the default 5432 port), got error:
> psql: could not connect to server: Connection refused
> Is the server running on host "192.168.XX.XXX" and accepting
> TCP/IP connections on port 5432?
>
> The only tcp lines in my postgres.conf are
> #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
> # 0 selects the system default
> #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
> # 0 selects the system default
> #tcp_keepalives_count = 0 # TCP_KEEPCNT;
> # 0 selects the system default
> Should I change something here?
Check "listen_addresses" and "port" look OK. You're probably only
listening to localhost.
You can test by telnet-ing to port 5432 or using lsof / netstat to see
what connections you have open in that zone.
--
Richard Huxton
Archonet Ltd