From: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk> |
---|---|
To: | "Jimmie H(dot) Apsey" <japsey(at)futuredental(dot)com> |
Cc: | mallah(at)trade-india(dot)com, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Postgres client/server parameters? |
Date: | 2003-04-28 20:19:17 |
Message-ID: | Pine.LNX.4.21.0304282106410.7284-100000@ponder.fairway2k.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(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
--
Nigel Andrews
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Ayers | 2003-04-28 20:20:17 | Re: Postgres client/server parameters? |
Previous Message | Ian Barwick | 2003-04-28 20:14:05 | Re: Implementation Plataform |