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

Поиск
Список
Период
Сортировка
От Mark
Тема Re: BUG #4787: Hardlink (ln) causes startup failure with bizarre "timezone_abbreviations" error
Дата
Msg-id 200905020754.n427sc4d024319@asarian-host.net
обсуждение исходный текст
Ответ на Re: BUG #4787: Hardlink (ln) causes startup failure with bizarre "timezone_abbreviations" error  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #4787: Hardlink (ln) causes startup failure with bizarre "timezone_abbreviations" error
Список pgsql-bugs
-----Original Message-----
From: pgsql-bugs-owner@postgresql.org
[mailto:pgsql-bugs-owner@postgresql.org] On Behalf Of Tom Lane
Sent: vrijdag 1 mei 2009 23:57
To: Mark; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #4787: Hardlink (ln) causes startup failure with
bizarre "timezone_abbreviations" error

> What I'm inclined to do is modify PostmasterMain so that immediately
> after find_my_exec, it checks that get_share_path returns the name of
> a readable directory.

I understand the rationale for relocatable packages. So, I guess hardlinks
are out. But, barring hardlinks, perhaps, in the existence of a symlink, a
simple 'readlink' function could be done to auto-correct PostgreSQL's
base-location? Ala:

char buf[1024];
ssizet_t len;
....
if ((len = readlink ("/usr/local/bin/pg_ctl", buf, sizeof(buf)-1)) != -1)
    buf[len] = '\0';

Symlinks are used quite often, *especially* when dealing with relocatable
packages (read: that will likely not reside in /usr/local/, etc.). And it
would only requires two or three extra lines of code, no?

At any rate, I appreciate you looking into this.

- Mark

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4787: Hardlink (ln) causes startup failure with bizarre "timezone_abbreviations" error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4787: Hardlink (ln) causes startup failure with bizarre "timezone_abbreviations" error