Re: question about 2 versions and libraries

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Tina Messmann <tina(dot)messmann(at)xinux(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: question about 2 versions and libraries
Date: 2002-05-27 16:21:53
Message-ID: 1022516513.32452.327.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2002-05-27 at 14:34, Tina Messmann wrote:
> Oliver Elphick wrote:
> >Are you looking at the right postgresql.conf? The Debian file
> >/etc/postgresql/postgresql.conf is the target of a symbolic link from
> >$PGDATA/postgresql.conf. The file you need to change is in the PGDATA
> >for your 7.2.1 postmaster. If you want it to be the same as for the
> >Debian package, you must make a symbolic link there to
> >/etc/postgresql/postgresql.conf. Otherwise it will use the default
> >created by initdb.
> >
> arwen:~# cat /var/lib/postgres7.2.1/data/postgresql.conf |grep unix_socket_dir
> unix_socket_directory = '/var/run/postgresql'
> arwen:~#
>
> i solved this problem now by setting PGHOST to /var/run/postgresql (is
> this the common solution?)
>
> >
> >Have you got PGDATA set correctly in both your client and your
> >postmaster environments?
> >
> no, i didn'd do that, where is the best place to set this variable for
> the client environment? is it .profile or profile?

That depends on your shell: .profile for sh, .bash_profile for bash, and
so on.

> but what happens when then calling the debian version? hmmm...should be
> no problem, since the commands from the debian package uses a wrapper
> that sets the environment correctly, am i right with that?

No, PGDATA in the environment should override the wrapper.

Best to create a testing script to set up the environment. Call it
psql721 and make sure it is in your path:

#!/bin/sh
PGDATA=/usr/local/pgsql/data
PGPORT=6543
PGHOST=
PGLIB=/usr/local/pgs1ql/lib
PATH=/usr/local/pgsql/bin:$PATH
LD_LIBRARY_PATH=$PGLIB:$LD_LIBRARY_PATH
export PGDATA PGPORT PGHOST PGLIB PATH LD_LIBRARY_PATH
psql $@

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C

"All that the Father giveth me shall come to me; and
him that cometh to me I will in no wise cast out."
John 6:37

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-05-27 16:28:00 Re: update db doesnt work
Previous Message Marc G. Fournier 2002-05-27 16:21:29 Re: [meta] news.postgresql.org still down - who do I