Re: Proposal: knowing detail of config files via SQL
От
Tom Lane
Тема
Re: Proposal: knowing detail of config files via SQL
Дата
Msg-id
32114.1421962234@sss.pgh.pa.us
Ответ на
Proposal: knowing detail of config files via SQL (Sawada Masahiko)
Список
Дерево обсуждения
Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: knowing detail of config files via SQL David G Johnston <david.g.johnston@gmail.com>
Re: Proposal: knowing detail of config files via SQL Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: knowing detail of config files via SQL David Johnston <david.g.johnston@gmail.com>
Re: Proposal: knowing detail of config files via SQL Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: knowing detail of config files via SQL Robert Haas <robertmhaas@gmail.com>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL David Fetter <david@fetter.org>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL David Fetter <david@fetter.org>
Re: Proposal: knowing detail of config files via SQL David Johnston <david.g.johnston@gmail.com>
Re: Proposal: knowing detail of config files via SQL Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL Stephen Frost <sfrost@snowman.net>
Re: Proposal: knowing detail of config files via SQL Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Proposal: knowing detail of config files via SQL Robert Haas <robertmhaas@gmail.com>
Re: Proposal: knowing detail of config files via SQL Stephen Frost <sfrost@snowman.net>
Re: Proposal: knowing detail of config files via SQL Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: knowing detail of config files via SQL Stephen Frost <sfrost@snowman.net>
Re: Proposal: knowing detail of config files via SQL Stephen Frost <sfrost@snowman.net>
Re: Proposal: knowing detail of config files via SQL Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Proposal: knowing detail of config files via SQL Stephen Frost <sfrost@snowman.net>
Re: Proposal: knowing detail of config files via SQL Peter Eisentraut <peter_e@gmx.net>
Re: Proposal: knowing detail of config files via SQL Stephen Frost <sfrost@snowman.net>
Re: Proposal: knowing detail of config files via SQL Peter Eisentraut <peter_e@gmx.net>
Re: Proposal: knowing detail of config files via SQL Stephen Frost <sfrost@snowman.net>
Re: Proposal: knowing detail of config files via SQL Greg Stark <stark@mit.edu>
Re: Proposal: knowing detail of config files via SQL Peter Eisentraut <peter_e@gmx.net>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL Stephen Frost <sfrost@snowman.net>
Re: Proposal: knowing detail of config files via SQL Stephen Frost <sfrost@snowman.net>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL David Steele <david@pgmasters.net>
Re: Proposal: knowing detail of config files via SQL Robert Haas <robertmhaas@gmail.com>
Re: Proposal: knowing detail of config files via SQL David Steele <david@pgmasters.net>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL Stephen Frost <sfrost@snowman.net>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL David Steele <david@pgmasters.net>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL David Steele <david@pgmasters.net>
Re: Proposal: knowing detail of config files via SQL David Steele <david@pgmasters.net>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL David Steele <david@pgmasters.net>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL Mike Blackwell <mike.blackwell@rrd.com>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Re: Proposal: knowing detail of config files via SQL Amit Kapila <amit.kapila16@gmail.com>
Re: Proposal: knowing detail of config files via SQL David Johnston <david.g.johnston@gmail.com>
Re: Proposal: knowing detail of config files via SQL Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Proposal: knowing detail of config files via SQL Sawada Masahiko <sawada.mshk@gmail.com>
Sawada Masahiko writes: > As per discussion > , > I would like to proposal new view like pg_file_settings to know detail > of config file via SQL. > - Background > In 9.4 postgresql.auto.conf is added to support ALTER SYSTEM command > and that config file is loaded after whenever postgresql.conf is > loaded. > That is, postgresql.auto.conf is quite high priority so that the value > in postgresql.conf can not work at all if DBA set it manually. > ALTER SYSTEM RESET command can remove the unnecessary value in > postgresql.auto.conf but there are no way to know about where the > value has came from. > (They can only give the information about the setting in last file it > is present.) > - Solution > The patch not is implemented yet, just proposing now. > I'm imaging that we can have new pg_file_settings view has following > column to store current assigned value in config file. > - guc value name > - guc value > - config file path (e.g. /opt/data/postgresql.sql, > /opt/data/postgresql.auto.conf, /opt/hoge.conf) > This view could be convenient for DBA to decide if the > postgresql.auto.conf is useful or not and if it's not useful then DBA > could use ALTER SYSTEM .. RESET command to remove the same from > postgresql.auto.conf. > Also other idea is to add additional columns existing view > (pg_settings), according to prev discussion. > Please give me comments. I still don't understand what problem you think needs to be solved. It's already perfectly clear from the pg_settings view when a value came from postgresql.auto.conf. For instance: regression=# select name,setting,source,sourcefile,sourceline from pg_settings where name = 'TimeZone'; name | setting | source | sourcefile | sourceline ----------+------------+--------------------+-------------------------------------------------+------------TimeZone | US/Eastern | configuration file | /home/postgres/testversion/data/postgresql.conf | 531 (1 row) regression=# alter system set timezone = 'Asia/Shanghai'; ALTER SYSTEM regression=# select pg_reload_conf();pg_reload_conf ----------------t (1 row) regression=# select name,setting,source,sourcefile,sourceline from pg_settings where name = 'TimeZone'; name | setting | source | sourcefile | sourceline ----------+---------------+--------------------+------------------------------------------------------+------------TimeZone | Asia/Shanghai | configuration file | /home/postgres/testversion/data/postgresql.auto.conf | 3 (1 row) regression=# alter system reset timezone; ALTER SYSTEM regression=# select pg_reload_conf();pg_reload_conf ----------------t (1 row) regression=# select name,setting,source,sourcefile,sourceline from pg_settings where name = 'TimeZone'; name | setting | source | sourcefile | sourceline ----------+------------+--------------------+-------------------------------------------------+------------TimeZone | US/Eastern | configuration file | /home/postgres/testversion/data/postgresql.conf | 531 (1 row) What else is needed? regards, tom lane
В списке pgsql-hackers по дате отправления
От: Andres Freund
Дата:
От: Andreas Karlsson
Дата: