Обсуждение: Postgres client/server parameters?

Поиск
Список
Период
Сортировка

Postgres client/server parameters?

От
"Jimmie H. Apsey"
Дата:
Please refer me to a source which explains in some detail how to access
a database residing on a server.  I've already setup the server database
and have applications running on the server which successfullly use the
Postgres database.  Now I want/need to access this database from a
client workstation.  Please help me set needed parameters on a host and
client in order to access pgsql from that client workstation.  I think I
also need to run postmaster with the "-i" parameter and perhaps I need
to modify the HOST:$PGDATA/usr/local/pgsql/data/pg_hba.conf file.  I
have been reading:

http://www.ca.postgresql.org/docs/faq-english.html but I still don't
know how to do it.

Red Hat gives no support on this simple question.  I just need a little
help or a suggestion or two.

Thank you,

Jim Apsey


Re: Postgres client/server parameters?

От
Дата:

Yes you may run postmaster with -i option but its simpler to modify
postgresql.conf file (also known as GUC)

uncomment the line
#tcp_connections=false

and change false to true.

then change pg_hba.conf file  to allow access from the client ip address.
that file is exemplified .

if you still face problem revert back

regds
mallah





> Please refer me to a source which explains in some detail how to access  a database residing on
> a server.  I've already setup the server database  and have applications running on the server
> which successfullly use the  Postgres database.  Now I want/need to access this database from a
>  client workstation.  Please help me set needed parameters on a host and  client in order to
> access pgsql from that client workstation.  I think I  also need to run postmaster with the
> "-i" parameter and perhaps I need  to modify the HOST:$PGDATA/usr/local/pgsql/data/pg_hba.conf
> file.  I  have been reading:
>
> http://www.ca.postgresql.org/docs/faq-english.html but I still don't  know how to do it.
>
> Red Hat gives no support on this simple question.  I just need a little  help or a suggestion
> or two.
>
> Thank you,
>
> Jim Apsey
>
>
> ---------------------------(end of broadcast)--------------------------- TIP 6: Have you
> searched our list archives?
>
> http://archives.postgresql.org



-----------------------------------------
Get your free web based email at trade-india.com.
   "India's Leading B2B eMarketplace.!"
http://www.trade-india.com/


Re: Postgres client/server parameters?

От
"Jimmie H. Apsey"
Дата:
Thank you Mallah, I think I understand now how to setup the host system
with changes to GUC and pg_hba.conf files.  But what do I need to do on
the client side as far as letting application know which database and
where it is located?

Thank you,
Jim Apsey
---------------------------------------------------------------------------------------------------------------
mallah@trade-india.com wrote:

>Yes you may run postmaster with -i option but its simpler to modify
>postgresql.conf file (also known as GUC)
>
>uncomment the line
>#tcp_connections=false
>
>and change false to true.
>
>then change pg_hba.conf file  to allow access from the client ip address.
>that file is exemplified .
>
>if you still face problem revert back
>
>regds
>mallah
>
>
>
>
>
>
>
>>Please refer me to a source which explains in some detail how to access  a database residing on
>>a server.  I've already setup the server database  and have applications running on the server
>>which successfullly use the  Postgres database.  Now I want/need to access this database from a
>> client workstation.  Please help me set needed parameters on a host and  client in order to
>>access pgsql from that client workstation.  I think I  also need to run postmaster with the
>>"-i" parameter and perhaps I need  to modify the HOST:$PGDATA/usr/local/pgsql/data/pg_hba.conf
>>file.  I  have been reading:
>>
>>http://www.ca.postgresql.org/docs/faq-english.html but I still don't  know how to do it.
>>
>>Red Hat gives no support on this simple question.  I just need a little  help or a suggestion
>>or two.
>>
>>Thank you,
>>
>>Jim Apsey
>>
>>
>>---------------------------(end of broadcast)--------------------------- TIP 6: Have you
>>searched our list archives?
>>
>>http://archives.postgresql.org
>>
>>
>
>
>
>-----------------------------------------
>Get your free web based email at trade-india.com.
>   "India's Leading B2B eMarketplace.!"
>http://www.trade-india.com/
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>
>


Re: Postgres client/server parameters?t

От
nolan@celery.tssi.com
Дата:
> Thank you Mallah, I think I understand now how to setup the host system
> with changes to GUC and pg_hba.conf files.  But what do I need to do on
> the client side as far as letting application know which database and
> where it is located?

The method of specifying the host varies, depending on the
client application.  What one(s) are you using?  psql?  PHP?  Perl?
--
Mike Nolan


Re: Postgres client/server parameters?

От
Дата:
> Thank you Mallah, I think I understand now how to setup the host system  with changes to GUC
> and pg_hba.conf files.  But what do I need to do on  the client side as far as letting
> application know which database and  where it is located?
Dear Jim

your application must be having some method of specifying
the datasource , typically hostname,username,password and database name
are asked for .

In case the application is expecting an ODBC datasource you will have
to download pgsqlodbc.

Unless you tell us more details abt what app it is its difficult to
tell
regds
mallah.


>
> Thank you,
> Jim Apsey
> --------------------------------------------------------------------------------------------------------------->
mallah@trade-india.comwrote: 
>
>>Yes you may run postmaster with -i option but its simpler to modify postgresql.conf file (also
>>known as GUC)
>>
>>uncomment the line
>>#tcp_connections=false
>>
>>and change false to true.
>>
>>then change pg_hba.conf file  to allow access from the client ip address. that file is
>>exemplified .
>>
>>if you still face problem revert back
>>
>>regds
>>mallah
>>
>>
>>
>>
>>
>>
>>
>>>Please refer me to a source which explains in some detail how to access  a database residing
>>>on a server.  I've already setup the server database  and have applications running on the
>>>server which successfullly use the  Postgres database.  Now I want/need to access this
>>>database from a
>>> client workstation.  Please help me set needed parameters on a host and  client in order to
>>>access pgsql from that client workstation.  I think I  also need to run postmaster with the
>>>"-i" parameter and perhaps I need  to modify the HOST:$PGDATA/usr/local/pgsql/data/pg_hba.conf
>>>file.  I  have been reading:
>>>
>>>http://www.ca.postgresql.org/docs/faq-english.html but I still don't  know how to do it.
>>>
>>>Red Hat gives no support on this simple question.  I just need a little  help or a suggestion
>>>or two.
>>>
>>>Thank you,
>>>
>>>Jim Apsey
>>>
>>>
>>>---------------------------(end of broadcast)--------------------------- TIP 6: Have you
>>>searched our list archives?
>>>
>>>http://archives.postgresql.org
>>>
>>>
>>
>>
>>
>>-----------------------------------------
>>Get your free web based email at trade-india.com.
>>   "India's Leading B2B eMarketplace.!"
>>http://www.trade-india.com/
>>
>>
>>---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and
>>unsubscribe commands go to majordomo@postgresql.org
>>
>>



-----------------------------------------
Get your free web based email at trade-india.com.
   "India's Leading B2B eMarketplace.!"
http://www.trade-india.com/


Re: Postgres client/server parameters?

От
"Jimmie H. Apsey"
Дата:
Hello again mallah,
Fair enough.  I am porting an application (which I wrote) comprised of
10 modules (i.e. stand-alone applications) which are written in C.
 These C programs call database library functions and X Windows library
functions.
Currently, these ported C programs run just fine on the database server,
our only workstation and development station.  I am now trying to get
these same programs to work on a client workstation.  So, I need to know
what environment parameters are needed to be set, etc.  On the SGI
system I wrote and has been in production for five years, there is an
Illustra (which came after Postgres and INGRES in Michael Stonebraker
products) parameter file which contains certain directories, buffer and
cache sizes, password and the hostname of the database server.

Also, I have a command line prompt for issuing commands directly to the
database.  For example, I have on my current Postgres server the ability
to type at the command prompt,

     "/usr/bin/psql database_name"

and I am put into the database server prompt of #.

How do I do this on another workstation?

Next, how do I run the C programs which access the Postgres database
from another workstation?

I suspect the answer for both is similar.

Also, I looked into the postgres.conf file you mentioned below but there
was no line in it which reads, "#tcp_connections=false".

I am trying to port the SGI system to Red Hat Advanced Server 2.1 which
contains Postgres 7.1.3 if I read the rpm -qa results correctly.

Thank you so much for your help and the help of others.  I am sure there
will be the right help out here among the Postgres Users.

Regards to all and especially mallah@trade-india.com,
Jim Apsey
mallah@trade-india.com wrote:

>>Thank you Mallah, I think I understand now how to setup the host system  with changes to GUC
>>and pg_hba.conf files.  But what do I need to do on  the client side as far as letting
>>application know which database and  where it is located?
>>
>>
>Dear Jim
>
>your application must be having some method of specifying
>the datasource , typically hostname,username,password and database name
>are asked for .
>
>In case the application is expecting an ODBC datasource you will have
>to download pgsqlodbc.
>
>Unless you tell us more details abt what app it is its difficult to
>tell
>regds
>mallah.
>
>
>
>
>>Thank you,
>>Jim Apsey
>>--------------------------------------------------------------------------------------------------------------->
mallah@trade-india.comwrote: 
>>
>>
>>
>>>Yes you may run postmaster with -i option but its simpler to modify postgresql.conf file (also
>>>known as GUC)
>>>
>>>uncomment the line
>>>#tcp_connections=false
>>>
>>>and change false to true.
>>>
>>>then change pg_hba.conf file  to allow access from the client ip address. that file is
>>>exemplified .
>>>
>>>if you still face problem revert back
>>>
>>>regds
>>>mallah
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>>Please refer me to a source which explains in some detail how to access  a database residing
>>>>on a server.  I've already setup the server database  and have applications running on the
>>>>server which successfullly use the  Postgres database.  Now I want/need to access this
>>>>database from a
>>>>client workstation.  Please help me set needed parameters on a host and  client in order to
>>>>access pgsql from that client workstation.  I think I  also need to run postmaster with the
>>>>"-i" parameter and perhaps I need  to modify the HOST:$PGDATA/usr/local/pgsql/data/pg_hba.conf
>>>>file.  I  have been reading:
>>>>
>>>>http://www.ca.postgresql.org/docs/faq-english.html but I still don't  know how to do it.
>>>>
>>>>Red Hat gives no support on this simple question.  I just need a little  help or a suggestion
>>>>or two.
>>>>
>>>>Thank you,
>>>>
>>>>Jim Apsey
>>>>
>>>>
>>>>---------------------------(end of broadcast)--------------------------- TIP 6: Have you
>>>>searched our list archives?
>>>>
>>>>http://archives.postgresql.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>-----------------------------------------
>>>Get your free web based email at trade-india.com.
>>>  "India's Leading B2B eMarketplace.!"
>>>http://www.trade-india.com/
>>>
>>>
>>>---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and
>>>unsubscribe commands go to majordomo@postgresql.org
>>>
>>>
>>>
>>>
>
>
>
>-----------------------------------------
>Get your free web based email at trade-india.com.
>   "India's Leading B2B eMarketplace.!"
>http://www.trade-india.com/
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>
>


Re: Postgres client/server parameters?

От
"Nigel J. Andrews"
Дата:
On Mon, 28 Apr 2003, Jimmie H. Apsey wrote:

> Hello again mallah,
> Fair enough.  I am porting an application (which I wrote) comprised of
> 10 modules (i.e. stand-alone applications) which are written in C.
>  These C programs call database library functions and X Windows library
> functions.
> Currently, these ported C programs run just fine on the database server,
> our only workstation and development station.  I am now trying to get
> these same programs to work on a client workstation.  So, I need to know
> what environment parameters are needed to be set, etc.  On the SGI
> system I wrote and has been in production for five years, there is an
> Illustra (which came after Postgres and INGRES in Michael Stonebraker
> products) parameter file which contains certain directories, buffer and
> cache sizes, password and the hostname of the database server.

So create a new parameter file for the postgresql connection that contains:
user name to connect as
password (if appropiate) for that user
host name of server to connect to
database name to use on that server
and optionally the port number used by postgresql on the server

Then connect to the database using whatever you must already be using but with
the details from your parameter file.

See
http://www.postgresql.org/docs/view.php?version=7.1&idoc=0&file=libpq.html#LIBPQ-CONNECT


>
> Also, I have a command line prompt for issuing commands directly to the
> database.  For example, I have on my current Postgres server the ability
> to type at the command prompt,
>
>      "/usr/bin/psql database_name"
>
> and I am put into the database server prompt of #.
> How do I do this on another workstation?

Well, install the postgresql clients package, or the whole postgresql package
if it's not split up (needed anyway for libpq) and then type:

psql -U postgres -h servername -p portnumber database_name

> Next, how do I run the C programs which access the Postgres database
> from another workstation?

However you run them now, they'll be using the parameter file won't they?

> I suspect the answer for both is similar.
>
> Also, I looked into the postgres.conf file you mentioned below but there
> was no line in it which reads, "#tcp_connections=false".

There isn't in 7.1.3. You need to make sure the postmaster is started is the -i
switch.


> I am trying to port the SGI system to Red Hat Advanced Server 2.1 which
> contains Postgres 7.1.3 if I read the rpm -qa results correctly.

I sat with a supply the other day installing postgresql 7.3.2 on a RHAS 2.1
system. It rebuilt from RPMS without problem. If your applications can handle
it I suggest doing that as the benefits are probably worth it.

> > Thank you so much for your help and the help of others.  I am sure there
> will be the right help out here among the Postgres Users.
>
> Regards to all and especially mallah@trade-india.com,
> Jim Apsey
> mallah@trade-india.com wrote:
>
> >>Thank you Mallah, I think I understand now how to setup the host system  with changes to GUC
> >>and pg_hba.conf files.  But what do I need to do on  the client side as far as letting
> >>application know which database and  where it is located?
> >>
> >>
> >Dear Jim
> >
> >your application must be having some method of specifying
> >the datasource , typically hostname,username,password and database name
> >are asked for .
> >
> >In case the application is expecting an ODBC datasource you will have
> >to download pgsqlodbc.
> >
> >Unless you tell us more details abt what app it is its difficult to
> >tell
> >regds
> >mallah.
> >
> >
> >
> >
> >>Thank you,
> >>Jim Apsey
> >>--------------------------------------------------------------------------------------------------------------->
mallah@trade-india.comwrote: 
> >>
> >>
> >>
> >>>Yes you may run postmaster with -i option but its simpler to modify postgresql.conf file (also
> >>>known as GUC)
> >>>
> >>>uncomment the line
> >>>#tcp_connections=false
> >>>
> >>>and change false to true.
> >>>
> >>>then change pg_hba.conf file  to allow access from the client ip address. that file is
> >>>exemplified .
> >>>
> >>>if you still face problem revert back
> >>>
> >>>regds
> >>>mallah
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>Please refer me to a source which explains in some detail how to access  a database residing
> >>>>on a server.  I've already setup the server database  and have applications running on the
> >>>>server which successfullly use the  Postgres database.  Now I want/need to access this
> >>>>database from a
> >>>>client workstation.  Please help me set needed parameters on a host and  client in order to
> >>>>access pgsql from that client workstation.  I think I  also need to run postmaster with the
> >>>>"-i" parameter and perhaps I need  to modify the HOST:$PGDATA/usr/local/pgsql/data/pg_hba.conf
> >>>>file.  I  have been reading:
> >>>>
> >>>>http://www.ca.postgresql.org/docs/faq-english.html but I still don't  know how to do it.
> >>>>
> >>>>Red Hat gives no support on this simple question.  I just need a little  help or a suggestion
> >>>>or two.
> >>>>
> >>>>Thank you,
> >>>>
> >>>>Jim Apsey


--
Nigel Andrews


Re: Postgres client/server parameters?

От
Andrew Ayers
Дата:
Jimmie H. Apsey wrote:
> Hello again mallah,
> Fair enough.  I am porting an application (which I wrote) comprised of
> 10 modules (i.e. stand-alone applications) which are written in C. These
> C programs call database library functions and X Windows library functions.
> Currently, these ported C programs run just fine on the database server,
> our only workstation and development station.  I am now trying to get
> these same programs to work on a client workstation.  So, I need to know
> what environment parameters are needed to be set, etc.  On the SGI
> system I wrote and has been in production for five years, there is an
> Illustra (which came after Postgres and INGRES in Michael Stonebraker
> products) parameter file which contains certain directories, buffer and
> cache sizes, password and the hostname of the database server.

If I am understanding you correctly, it sounds like in some manner you
are using the local PostgreSQL libraries to update the database, and you
want to be able to do the same thing remotely from another machine.
While I suspect that such a thing could be done, it probably wouldn't be
very portable. I would suggest the same thing mallah has, that you
recode your application to use an ODBC connection to the database
server. Unless your application is something that is to manage the
database itself, this is probably the best thing to do. I would even go
so far as to say you can manage the database as well via ODBC (though I
don't know much about PostgreSQL to back that assertion up), provided
you have the right access, permissions, etc for the user login.

> Also, I have a command line prompt for issuing commands directly to the
> database.  For example, I have on my current Postgres server the ability
> to type at the command prompt,
>
>     "/usr/bin/psql database_name"
>
> and I am put into the database server prompt of #.
>
> How do I do this on another workstation?
>
> Next, how do I run the C programs which access the Postgres database
> from another workstation?

Another possibility would be to leave the programs running on the
server, and export the X session output to the appropriate workstations.
  (my terminology may be off here, but basically with X you can run a
program, and re-direct the output over the network to another box
running X, similar to the Windows products PC-Anywhere and Terminal
Server, as well as products like Remote Desktop and VNC).

I hope this helps a little,

Andrew L. Ayers


Re: Postgres client/server parameters?

От
elein
Дата:
As an ex-illustrite, I create a file similar to the MI_PARAMS
file for Illustra only I call it pgenv.
In it I put the values for
PGHOST
PGUSER
PGPORT
You can also have PGDATABASE and neglect PGUSER if
you use your own login. source or "dot" the file before
calling your client program to define the variables in your
current environment.

Many people define these variables in their profiles or .logins.
That is good too.  You just want to set these values in the
client environment and then use the default connection
settings.  On a windowsy client you are on your own.

elein

On Monday 28 April 2003 12:21, Jimmie H. Apsey wrote:
> Hello again mallah,
> Fair enough.  I am porting an application (which I wrote) comprised of
> 10 modules (i.e. stand-alone applications) which are written in C.
>  These C programs call database library functions and X Windows library
> functions.
> Currently, these ported C programs run just fine on the database server,
> our only workstation and development station.  I am now trying to get
> these same programs to work on a client workstation.  So, I need to know
> what environment parameters are needed to be set, etc.  On the SGI
> system I wrote and has been in production for five years, there is an
> Illustra (which came after Postgres and INGRES in Michael Stonebraker
> products) parameter file which contains certain directories, buffer and
> cache sizes, password and the hostname of the database server.
>
> Also, I have a command line prompt for issuing commands directly to the
> database.  For example, I have on my current Postgres server the ability
> to type at the command prompt,
>
>      "/usr/bin/psql database_name"
>
> and I am put into the database server prompt of #.
>
> How do I do this on another workstation?
>
> Next, how do I run the C programs which access the Postgres database
> from another workstation?
>
> I suspect the answer for both is similar.
>
> Also, I looked into the postgres.conf file you mentioned below but there
> was no line in it which reads, "#tcp_connections=false".
>
> I am trying to port the SGI system to Red Hat Advanced Server 2.1 which
> contains Postgres 7.1.3 if I read the rpm -qa results correctly.
>
> Thank you so much for your help and the help of others.  I am sure there
> will be the right help out here among the Postgres Users.
>
> Regards to all and especially mallah@trade-india.com,
> Jim Apsey
> mallah@trade-india.com wrote:
>
> >>Thank you Mallah, I think I understand now how to setup the host system  with changes to GUC
> >>and pg_hba.conf files.  But what do I need to do on  the client side as far as letting
> >>application know which database and  where it is located?
> >>
> >>
> >Dear Jim
> >
> >your application must be having some method of specifying
> >the datasource , typically hostname,username,password and database name
> >are asked for .
> >
> >In case the application is expecting an ODBC datasource you will have
> >to download pgsqlodbc.
> >
> >Unless you tell us more details abt what app it is its difficult to
> >tell
> >regds
> >mallah.
> >
> >
> >
> >
> >>Thank you,
> >>Jim Apsey
> >>--------------------------------------------------------------------------------------------------------------->
mallah@trade-india.comwrote: 
> >>
> >>
> >>
> >>>Yes you may run postmaster with -i option but its simpler to modify postgresql.conf file (also
> >>>known as GUC)
> >>>
> >>>uncomment the line
> >>>#tcp_connections=false
> >>>
> >>>and change false to true.
> >>>
> >>>then change pg_hba.conf file  to allow access from the client ip address. that file is
> >>>exemplified .
> >>>
> >>>if you still face problem revert back
> >>>
> >>>regds
> >>>mallah
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>Please refer me to a source which explains in some detail how to access  a database residing
> >>>>on a server.  I've already setup the server database  and have applications running on the
> >>>>server which successfullly use the  Postgres database.  Now I want/need to access this
> >>>>database from a
> >>>>client workstation.  Please help me set needed parameters on a host and  client in order to
> >>>>access pgsql from that client workstation.  I think I  also need to run postmaster with the
> >>>>"-i" parameter and perhaps I need  to modify the HOST:$PGDATA/usr/local/pgsql/data/pg_hba.conf
> >>>>file.  I  have been reading:
> >>>>
> >>>>http://www.ca.postgresql.org/docs/faq-english.html but I still don't  know how to do it.
> >>>>
> >>>>Red Hat gives no support on this simple question.  I just need a little  help or a suggestion
> >>>>or two.
> >>>>
> >>>>Thank you,
> >>>>
> >>>>Jim Apsey
> >>>>
> >>>>
> >>>>---------------------------(end of broadcast)--------------------------- TIP 6: Have you
> >>>>searched our list archives?
> >>>>
> >>>>http://archives.postgresql.org
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>-----------------------------------------
> >>>Get your free web based email at trade-india.com.
> >>>  "India's Leading B2B eMarketplace.!"
> >>>http://www.trade-india.com/
> >>>
> >>>
> >>>---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and
> >>>unsubscribe commands go to majordomo@postgresql.org
> >>>
> >>>
> >>>
> >>>
> >
> >
> >
> >-----------------------------------------
> >Get your free web based email at trade-india.com.
> >   "India's Leading B2B eMarketplace.!"
> >http://www.trade-india.com/
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> >
> >
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>

--
=============================================================
elein@varlena.com     Database Consulting     www.varlena.com
PostgreSQL General Bits    http:/www.varlena.com/GeneralBits/
   "Left foot, right foot, left foot, breathe.
   Right foot, left foot, right foot, breathe." --Father Tom


Re: Postgres client/server parameters?

От
"Jimmie H. Apsey"
Дата:
Thank you elein,

It's so helpful to meet an ex-Illustrite.

How did you know to call the once MI_PARAMS "pgenv"?  Also, what program
knows about this "pgenv" file or the environmental variables, PGHOST,
PGUSER, PGPORT?

This is, however, just exactly what I'm looking for.

Jim Apsey
-------------------------------------------------------------------------------------------------------------------
elein wrote:

>As an ex-illustrite, I create a file similar to the MI_PARAMS
>file for Illustra only I call it pgenv.
>In it I put the values for
>PGHOST
>PGUSER
>PGPORT
>You can also have PGDATABASE and neglect PGUSER if
>you use your own login. source or "dot" the file before
>calling your client program to define the variables in your
>current environment.
>
>Many people define these variables in their profiles or .logins.
>That is good too.  You just want to set these values in the
>client environment and then use the default connection
>settings.  On a windowsy client you are on your own.
>
>elein
>
>On Monday 28 April 2003 12:21, Jimmie H. Apsey wrote:
>
>
>>Hello again mallah,
>>Fair enough.  I am porting an application (which I wrote) comprised of
>>10 modules (i.e. stand-alone applications) which are written in C.
>> These C programs call database library functions and X Windows library
>>functions.
>>Currently, these ported C programs run just fine on the database server,
>>our only workstation and development station.  I am now trying to get
>>these same programs to work on a client workstation.  So, I need to know
>>what environment parameters are needed to be set, etc.  On the SGI
>>system I wrote and has been in production for five years, there is an
>>Illustra (which came after Postgres and INGRES in Michael Stonebraker
>>products) parameter file which contains certain directories, buffer and
>>cache sizes, password and the hostname of the database server.
>>
>>Also, I have a command line prompt for issuing commands directly to the
>>database.  For example, I have on my current Postgres server the ability
>>to type at the command prompt,
>>
>>     "/usr/bin/psql database_name"
>>
>>and I am put into the database server prompt of #.
>>
>>How do I do this on another workstation?
>>
>>Next, how do I run the C programs which access the Postgres database
>>from another workstation?
>>
>>I suspect the answer for both is similar.
>>
>>Also, I looked into the postgres.conf file you mentioned below but there
>>was no line in it which reads, "#tcp_connections=false".
>>
>>I am trying to port the SGI system to Red Hat Advanced Server 2.1 which
>>contains Postgres 7.1.3 if I read the rpm -qa results correctly.
>>
>>Thank you so much for your help and the help of others.  I am sure there
>>will be the right help out here among the Postgres Users.
>>
>>Regards to all and especially mallah@trade-india.com,
>>Jim Apsey
>>mallah@trade-india.com wrote:
>>
>>
>>
>>>>Thank you Mallah, I think I understand now how to setup the host system  with changes to GUC
>>>>and pg_hba.conf files.  But what do I need to do on  the client side as far as letting
>>>>application know which database and  where it is located?
>>>>
>>>>
>>>>
>>>>
>>>Dear Jim
>>>
>>>your application must be having some method of specifying
>>>the datasource , typically hostname,username,password and database name
>>>are asked for .
>>>
>>>In case the application is expecting an ODBC datasource you will have
>>>to download pgsqlodbc.
>>>
>>>Unless you tell us more details abt what app it is its difficult to
>>>tell
>>>regds
>>>mallah.
>>>
>>>
>>>
>>>
>>>
>>>
>>>>Thank you,
>>>>Jim Apsey
>>>>--------------------------------------------------------------------------------------------------------------->
mallah@trade-india.comwrote: 
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Yes you may run postmaster with -i option but its simpler to modify postgresql.conf file (also
>>>>>known as GUC)
>>>>>
>>>>>uncomment the line
>>>>>#tcp_connections=false
>>>>>
>>>>>and change false to true.
>>>>>
>>>>>then change pg_hba.conf file  to allow access from the client ip address. that file is
>>>>>exemplified .
>>>>>
>>>>>if you still face problem revert back
>>>>>
>>>>>regds
>>>>>mallah
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Please refer me to a source which explains in some detail how to access  a database residing
>>>>>>on a server.  I've already setup the server database  and have applications running on the
>>>>>>server which successfullly use the  Postgres database.  Now I want/need to access this
>>>>>>database from a
>>>>>>client workstation.  Please help me set needed parameters on a host and  client in order to
>>>>>>access pgsql from that client workstation.  I think I  also need to run postmaster with the
>>>>>>"-i" parameter and perhaps I need  to modify the HOST:$PGDATA/usr/local/pgsql/data/pg_hba.conf
>>>>>>file.  I  have been reading:
>>>>>>
>>>>>>http://www.ca.postgresql.org/docs/faq-english.html but I still don't  know how to do it.
>>>>>>
>>>>>>Red Hat gives no support on this simple question.  I just need a little  help or a suggestion
>>>>>>or two.
>>>>>>
>>>>>>Thank you,
>>>>>>
>>>>>>Jim Apsey
>>>>>>
>>>>>>
>>>>>>---------------------------(end of broadcast)--------------------------- TIP 6: Have you
>>>>>>searched our list archives?
>>>>>>
>>>>>>http://archives.postgresql.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>-----------------------------------------
>>>>>Get your free web based email at trade-india.com.
>>>>> "India's Leading B2B eMarketplace.!"
>>>>>http://www.trade-india.com/
>>>>>
>>>>>
>>>>>---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and
>>>>>unsubscribe commands go to majordomo@postgresql.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>-----------------------------------------
>>>Get your free web based email at trade-india.com.
>>>  "India's Leading B2B eMarketplace.!"
>>>http://www.trade-india.com/
>>>
>>>
>>>---------------------------(end of broadcast)---------------------------
>>>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>>>
>>>
>>>
>>>
>>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 6: Have you searched our list archives?
>>
>>http://archives.postgresql.org
>>
>>
>>
>>
>
>
>


Re: Postgres client/server parameters?

От
"Jimmie H. Apsey"
Дата:
Thanks a lot for your help.  Connecting to Postgres database from a
workstation is working for me now quite well -- once I got Postgres
installed on my workstation!  Of course, I did use your suggestions for
setting environment variables PGHOST, PGUSER and PGPORT.
Jim Apsey
elein wrote:

>As an ex-illustrite, I create a file similar to the MI_PARAMS
>file for Illustra only I call it pgenv.
>In it I put the values for
>PGHOST
>PGUSER
>PGPORT
>You can also have PGDATABASE and neglect PGUSER if
>you use your own login. source or "dot" the file before
>calling your client program to define the variables in your
>current environment.
>
>Many people define these variables in their profiles or .logins.
>That is good too.  You just want to set these values in the
>client environment and then use the default connection
>settings.  On a windowsy client you are on your own.
>
>elein
>
>On Monday 28 April 2003 12:21, Jimmie H. Apsey wrote:
>
>
>>Hello again mallah,
>>Fair enough.  I am porting an application (which I wrote) comprised of
>>10 modules (i.e. stand-alone applications) which are written in C.
>> These C programs call database library functions and X Windows library
>>functions.
>>Currently, these ported C programs run just fine on the database server,
>>our only workstation and development station.  I am now trying to get
>>these same programs to work on a client workstation.  So, I need to know
>>what environment parameters are needed to be set, etc.  On the SGI
>>system I wrote and has been in production for five years, there is an
>>Illustra (which came after Postgres and INGRES in Michael Stonebraker
>>products) parameter file which contains certain directories, buffer and
>>cache sizes, password and the hostname of the database server.
>>
>>Also, I have a command line prompt for issuing commands directly to the
>>database.  For example, I have on my current Postgres server the ability
>>to type at the command prompt,
>>
>>     "/usr/bin/psql database_name"
>>
>>and I am put into the database server prompt of #.
>>
>>How do I do this on another workstation?
>>
>>Next, how do I run the C programs which access the Postgres database
>>from another workstation?
>>
>>I suspect the answer for both is similar.
>>
>>Also, I looked into the postgres.conf file you mentioned below but there
>>was no line in it which reads, "#tcp_connections=false".
>>
>>I am trying to port the SGI system to Red Hat Advanced Server 2.1 which
>>contains Postgres 7.1.3 if I read the rpm -qa results correctly.
>>
>>Thank you so much for your help and the help of others.  I am sure there
>>will be the right help out here among the Postgres Users.
>>
>>Regards to all and especially mallah@trade-india.com,
>>Jim Apsey
>>mallah@trade-india.com wrote:
>>
>>
>>
>>>>Thank you Mallah, I think I understand now how to setup the host system  with changes to GUC
>>>>and pg_hba.conf files.  But what do I need to do on  the client side as far as letting
>>>>application know which database and  where it is located?
>>>>
>>>>
>>>>
>>>>
>>>Dear Jim
>>>
>>>your application must be having some method of specifying
>>>the datasource , typically hostname,username,password and database name
>>>are asked for .
>>>
>>>In case the application is expecting an ODBC datasource you will have
>>>to download pgsqlodbc.
>>>
>>>Unless you tell us more details abt what app it is its difficult to
>>>tell
>>>regds
>>>mallah.
>>>
>>>
>>>
>>>
>>>
>>>
>>>>Thank you,
>>>>Jim Apsey
>>>>--------------------------------------------------------------------------------------------------------------->
mallah@trade-india.comwrote: 
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Yes you may run postmaster with -i option but its simpler to modify postgresql.conf file (also
>>>>>known as GUC)
>>>>>
>>>>>uncomment the line
>>>>>#tcp_connections=false
>>>>>
>>>>>and change false to true.
>>>>>
>>>>>then change pg_hba.conf file  to allow access from the client ip address. that file is
>>>>>exemplified .
>>>>>
>>>>>if you still face problem revert back
>>>>>
>>>>>regds
>>>>>mallah
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Please refer me to a source which explains in some detail how to access  a database residing
>>>>>>on a server.  I've already setup the server database  and have applications running on the
>>>>>>server which successfullly use the  Postgres database.  Now I want/need to access this
>>>>>>database from a
>>>>>>client workstation.  Please help me set needed parameters on a host and  client in order to
>>>>>>access pgsql from that client workstation.  I think I  also need to run postmaster with the
>>>>>>"-i" parameter and perhaps I need  to modify the HOST:$PGDATA/usr/local/pgsql/data/pg_hba.conf
>>>>>>file.  I  have been reading:
>>>>>>
>>>>>>http://www.ca.postgresql.org/docs/faq-english.html but I still don't  know how to do it.
>>>>>>
>>>>>>Red Hat gives no support on this simple question.  I just need a little  help or a suggestion
>>>>>>or two.
>>>>>>
>>>>>>Thank you,
>>>>>>
>>>>>>Jim Apsey
>>>>>>
>>>>>>
>>>>>>---------------------------(end of broadcast)--------------------------- TIP 6: Have you
>>>>>>searched our list archives?
>>>>>>
>>>>>>http://archives.postgresql.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>-----------------------------------------
>>>>>Get your free web based email at trade-india.com.
>>>>> "India's Leading B2B eMarketplace.!"
>>>>>http://www.trade-india.com/
>>>>>
>>>>>
>>>>>---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and
>>>>>unsubscribe commands go to majordomo@postgresql.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>-----------------------------------------
>>>Get your free web based email at trade-india.com.
>>>  "India's Leading B2B eMarketplace.!"
>>>http://www.trade-india.com/
>>>
>>>
>>>---------------------------(end of broadcast)---------------------------
>>>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>>>
>>>
>>>
>>>
>>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 6: Have you searched our list archives?
>>
>>http://archives.postgresql.org
>>
>>
>>
>>
>
>
>