Re: initdb failure with Postgres 8.4.4 - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: initdb failure with Postgres 8.4.4
Date
Msg-id 4D024D3F.7030909@dunslane.net
Whole thread Raw
In response to Re: initdb failure with Postgres 8.4.4  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: initdb failure with Postgres 8.4.4
List pgsql-hackers

On 12/10/2010 10:25 AM, Andrew Dunstan wrote:
>
>
>>
>>>      Not claiming any knowledge in this area - would it be 
>>> reasonable to expect that if -L option works for other input files 
>>> it should
>>>      also work for timezones?
>> ...this seems reasonable.
>
>
> OK, this has nothing at all to do with the absence of the build path. 
> It has to do with using a non-standard sharedir.I have reproduced it 
> thus:
>
>

[snip]

> I will dig a bit further.
>
>

Here's my understanding.

It's not initdb that's really complaining. The timezone files are not 
inputs to initdb. It's the postgres that initdb invokes that's complaining.

Postges will look for the share file in two places: the configured 
install directory or a share directory whose path is calculated relative 
to its own location. initdb's -L flag doesn't override that, it only 
overrides where initdb itself looks for files (such as the BKI file). 
The bottom line I think is that if you intend to use a non-standard 
layout you need to specify the paths for everything and then not move 
them after installation. If you want the installation to be movable, 
just specify --prefix, but then if you move it you have to move the 
whole thing together. You can't just relocate one directory and expect 
it to work. It won't.

cheers

andrew


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Extensions, patch v16
Next
From: Robert Haas
Date:
Subject: Re: initdb failure with Postgres 8.4.4