Re: postgresql.auto.conf read from wrong directory - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: postgresql.auto.conf read from wrong directory
Date
Msg-id CAA4eK1+r3vmx3QBbukJAq82DJyyV8tMhO_yqNjLS1jdYXgcgzw@mail.gmail.com
Whole thread Raw
In response to Re: postgresql.auto.conf read from wrong directory  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: postgresql.auto.conf read from wrong directory
List pgsql-hackers
On Thu, May 8, 2014 at 6:51 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Wed, May 7, 2014 at 4:57 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> This problem occurs because we don't have the value of data_directory
>> set in postgresql.conf by the time we want to parse .auto.conf file
>> during server start.  The value of data_directory is only available after
>> processing of config files.  To fix it, we need to store the value of
>> data_directory during parse of postgresql.conf file so that we can use it
>> till data_directory is actually set.  Attached patch fixes the problem.
>> Could you please once confirm if it fixes the problem in your
>> env./scenario.
>
> Maybe this is nitpicking, but what happens when postgresql.auto.conf also
> includes the setting of data_directory? This is possible because we can
> set data_directory via ALTER SYSTEM now.
  Yes, that will also be issue similar to above.

> Should we just ignore such
> problematic setting in postgresql.auto.conf with warning message?

Another way could be that we detect the same during server start
(while parsing postgresql.auto.conf) and then allow for reparse of
auto conf file, but I think that will be bit more complicated.  So lets
try to solve it in a way suggested by you.  If there is no objection by
anyone else then I will update the patch.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Next
From: Stephen Frost
Date:
Subject: Re: postgresql.auto.conf read from wrong directory