Re: BUG #4787: Hardlink (ln) causes startup failure with bizarre "timezone_abbreviations" error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark <admin(at)asarian-host(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4787: Hardlink (ln) causes startup failure with bizarre "timezone_abbreviations" error
Date: 2009-05-01 16:50:04
Message-ID: 14569.1241196604@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Mark <admin(at)asarian-host(dot)net> writes:
> As for pg_ctl assuming it can find postgres in the same directory it is
> in, it SHOULD. :) Basically, I hard-linked all files in
> /usr/local/PostgreSQL/bin/ to /usr/local/bin/. So, even when pg_ctl got
> started from /usr/local/bin/, it should have found /usr/local/bin/postgres
> right under its very nose!

Well, it did (else you'd not have got as far as you did). The point you
are missing is that other components of the distribution, such as the
share/ directory, are expected to be found relative to where the
binaries are. (This behavior isn't a bug, but intentional to allow
relocatable distribution packages.) If postgres is executed via a
symlink then it will correctly determine its own location and
successfully locate the share/ directory; otherwise not so much.
I think pg_ctl needs to be able to find share/ as well, though that
might depend on other things such as whether you have NLS enabled.

I was under the impression that there was some code in there to complain
if the path-finding code failed, but maybe it's being executed too late.
Anyway the bug here is an inadequate error message, not that we should
support the configuration.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Kruuus 2009-05-01 16:57:02 BUG #4789: ERROR 22008 on timestamp import
Previous Message Kevin Field 2009-05-01 16:41:56 Re: BUG #4763: postgres service unstable, even during install