Re: Proposal: knowing detail of config files via SQL

From: David Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: knowing detail of config files via SQL
Date: 2015-01-30 19:12:09
Message-ID: CAKFQuwbyPX+fi8+MaXazQ-c0YxuaL5ZcivvTMdfQNJeabBvphQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 30, 2015 at 12:05 PM, David Fetter <david(at)fetter(dot)org> wrote:

> On Sat, Jan 31, 2015 at 12:50:20AM +0900, Sawada Masahiko wrote:
> >
> > [postgres][5432](1)=# select * from pg_file_settings where name =
> 'work_mem';
> > -[ RECORD 1 ]------------------------------------------------------
> > name | work_mem
> > setting | 128MB
> > sourcefile | /home/masahiko/pgsql/master/3data/hoge.conf
> > -[ RECORD 2 ]------------------------------------------------------
> > name | work_mem
> > setting | 64MB
> > sourcefile | /home/masahiko/pgsql/master/3data/postgresql.auto.conf
>
> Masuhiko-san,
>
> I apologize for not communicating clearly. My alternative proposal is
> to add a NULL-able sourcefile column to pg_settings. This is as an
> alternative to creating a new pg_file_settings view.
>
> Why might the contents of pg_settings be different from what would be
> in pg_file_settings, apart from the existence of this column?
>
>

​​The contents of pg_settings uses the setting name as a primary key.

The contents of pg_file_setting uses a compound key consisting of the
setting name and the source file.

See "work_mem" in the provided example.

More specifically pg_settings only care about the "currently active
setting" while this cares about "inactive" settings as well.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-01-30 19:56:52 Re: Proposal: knowing detail of config files via SQL
Previous Message David Fetter 2015-01-30 19:05:52 Re: Proposal: knowing detail of config files via SQL