Re: postgresql.auto.conf read from wrong directory

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Christoph Berg <cb(at)df7cb(dot)de>, Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgresql.auto.conf read from wrong directory
Date: 2014-05-27 05:05:04
Message-ID: CAA4eK1LSR4nPDTpKejQ1svf8OuuAWsE7yruQVNsm6AptKyrf2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, May 11, 2014 at 11:23 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.

I introduced a new flag bit (GUC_DISALLOW_IN_AUTO_FILE) to
disallow parameters by Alter System and disallowed data_directory to
be set by Alter System.

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

Attachment Content-Type Size
prohibit_data_dir_by_alter_system.patch application/octet-stream 1.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-05-27 06:17:59 Race condition within _bt_findinsertloc()? (new page split code)
Previous Message Tom Lane 2014-05-27 04:50:43 Re: [PATCH] Replacement for OSSP-UUID for Linux and BSD