Re: New horology failure

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <mha(at)sollentuna(dot)net>, Manfred Koizar <mkoi-pg(at)aon(dot)at>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New horology failure
Date: 2004-05-25 20:48:25
Message-ID: 200405252048.i4PKmPU28720@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Well, in the case you have an install prefix of /usr, we wouldn't want
> > relative installs because you would have /usr/bin and
> > /usr/lib/postgresql and that wouldn't be relocatable.
>
> Why not?
>
> ISTM that the algorithm should go something like this:
>
> 1. Take PGBINDIR and strip off the last component (presumably "bin").
>
> 2. See if this matches the configured SHAREDIR, PKGLIBDIR, or whatever
> *for as many components as are in the stripped BINDIR*. Do not
> assume that SHAREDIR must have the same number of components.
>
> 3. If match, then what you should do is use the remaining unmatched
> part of SHAREDIR etc as what to append to the trimmed exec_path.
>
> For example given the test situation I had:
>
> PGBINDIR = '/home/tgl/testversion/bin'
> PGSHAREDIR = '/home/tgl/testversion/share/postgresql'
> my_exec_path = '/home/tgl/pgsql-list/src/test/regress/./tmp_check/install//home/tgl/testversion/bin/postmaster'
> ret_path = '/home/tgl/testversion/share/postgresql'
>
> what *should* have happened was compare /home/tgl/testversion to
> /home/tgl/testversion, decide they agree, and extract share/postgresql
> as the part to attach to my_exec_path. Then you'd strip two components
> from my_exec_path ("bin" and program name) and attach
> "share/postgresql". Voila ... right answer.

OK, I have committed this change. Please let me know if it doesn't work
the way you wanted.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2004-05-25 20:53:11 another optimizer bug?
Previous Message Greg Stark 2004-05-25 20:36:39 Re: Optimizer Bug issue