Re: Postgres client/server parameters?

From: "Jimmie H(dot) Apsey" <japsey(at)futuredental(dot)com>
To: elein(at)varlena(dot)com
Cc: mallah(at)trade-india(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres client/server parameters?
Date: 2003-05-07 15:27:14
Message-ID: 3EB925D2.40307@futuredental.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)trade-india(dot)com,
>>Jim Apsey
>>mallah(at)trade-india(dot)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(at)trade-india(dot)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(at)postgresql(dot)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(at)postgresql(dot)org
>>>
>>>
>>>
>>>
>>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 6: Have you searched our list archives?
>>
>>http://archives.postgresql.org
>>
>>
>>
>>
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-05-07 15:38:36 Re: Server error
Previous Message scott.marlowe 2003-05-07 15:26:29 Re: Server error