Re: BUG #4787: Hardlink (ln) causes startup failure with bizarre "timezone_abbreviations" error - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4787: Hardlink (ln) causes startup failure with bizarre "timezone_abbreviations" error
Date
Msg-id 14569.1241196604@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #4787: Hardlink (ln) causes startup failure with bizarre "timezone_abbreviations" error  (Mark <admin@asarian-host.net>)
Responses Re: BUG #4787: Hardlink (ln) causes startup failure with bizarre "timezone_abbreviations" error
List pgsql-bugs
Mark <admin@asarian-host.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

pgsql-bugs by date:

Previous
From: Mark
Date:
Subject: Re: BUG #4787: Hardlink (ln) causes startup failure with bizarre "timezone_abbreviations" error
Next
From: Kevin Field
Date:
Subject: Re: BUG #4763: postgres service unstable, even during install