Re: question about 2 versions and libraries

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: question about 2 versions and libraries
Дата
Msg-id 1022516513.32452.327.camel@linda
обсуждение исходный текст
Ответ на Re: question about 2 versions and libraries  (Tina Messmann <tina.messmann@xinux.de>)
Список 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.Elphick@lfix.co.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

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: [meta] news.postgresql.org still down - who do I
Следующее
От: Tom Lane
Дата:
Сообщение: Re: update db doesnt work