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 CAA4eK1JFnDr0=PinqPOY0CVETPs20nqSd0_DnVoGiRV8gWDBpA@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 Sun, May 11, 2014 at 4:38 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> ISTM that data_directory is in different situation from the other. That is,
> setting data_directory in postgresql.auto.conf is problematic whether its
> setting value is valid or invalid. Imagine the case where data_directory
> is set to '/data1' and '/data2' in config_directory/postgresql.conf and
> /data1/postgresql.auto.conf, respectively. In this case, firstly the server
> doesn't read /data2/postgresql.auto.conf when it starts up, even if your
> patch has been applied.

I think after my patch, first server will read data1/postgresql.auto.conf
on start as that is what is set in postgresql.conf.

> Secondly, the server doesn't read
> /data1/postgresql.auto.conf when it receives SIGHUP, and this causes
> the following error.
>
> LOG:  parameter "data_directory" cannot be changed without restarting the server

This happens because data_directory is PGC_POSTMASTER parameter
and none of such parameters can be changed with SIGHUP.

In above scenario, I think you are expecting it should use
/data2/postgresql.auto.conf and that is what you have mentioned
up-thread.  The way to handle it by server is just to forbid setting
this parameter
by Alter System or the user himself should not perform such an action.
Here if we want user to be careful of performing such an action, then may
be it's better to have such an indication in ALTER SYSTEM documentation.


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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Next
From: Amit Kapila
Date:
Subject: Re: 9.5: UPDATE/DELETE .. ORDER BY .. LIMIT ..