Re: Proposal: knowing detail of config files via SQL - Mailing list pgsql-hackers

From David Johnston
Subject Re: Proposal: knowing detail of config files via SQL
Date
Msg-id CAKFQuwbyPX+fi8+MaXazQ-c0YxuaL5ZcivvTMdfQNJeabBvphQ@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: knowing detail of config files via SQL  (David Fetter <david@fetter.org>)
Responses Re: Proposal: knowing detail of config files via SQL
List pgsql-hackers
On Fri, Jan 30, 2015 at 12:05 PM, David Fetter <david@fetter.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.
 

pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Proposal: knowing detail of config files via SQL
Next
From: Tom Lane
Date:
Subject: Re: Proposal: knowing detail of config files via SQL