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

From Tom Lane
Subject Re: postgresql.auto.conf read from wrong directory
Date
Msg-id 3109.1399830830@sss.pgh.pa.us
Whole thread Raw
In response to Re: postgresql.auto.conf read from wrong directory  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: postgresql.auto.conf read from wrong directory  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Amit Kapila <amit.kapila16@gmail.com> writes:
> 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.

I think it's clearly *necessary* to forbid setting data_directory in
postgresql.auto.conf.  The file is defined to be found in the data
directory, so any such setting is circular logic by definition;
no good can come of not rejecting it.

We already have a GUC flag bit about disallowing certain variables
in the config file (though I don't remember if it's enforced or
just advisory).  It seems to me that we'd better invent one for
disallowing in ALTER SYSTEM, as well.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 9.5: UPDATE/DELETE .. ORDER BY .. LIMIT ..
Next
From: Tom Lane
Date:
Subject: Re: postgresql.auto.conf read from wrong directory