Hi Hackers,

I would like to propose that we expose the "active" value of parameters in 
pg_settings, instead of "-1".  In this example below, when it's set to "-1" I 
need to know that autovacuum_work_mem is related to the setting of 
maintenance_work_mem, so that I can determine that the actual setting is 64MB:

postgresql.conf
===============
#autovacuum_work_mem = -1               # min 1MB, or -1 to use 
maintenance_work_mem
#maintenance_work_mem = 64MB            # min 1MB


pg_settings
===========
postgres=# SELECT name, setting, unit FROM pg_settings WHERE name IN 
('autovacuum_work_mem','maintenance_work_mem');
        name         | setting | unit
----------------------+---------+------
autovacuum_work_mem  | -1      | kB
maintenance_work_mem | 65536   | kB
(2 rows)


I think it would make sense to create a new column called something like 
"active_setting", which will allow simple verification of the setting that's in 
use without having to know the specifics about the parameter's relationship 
with others, and the version of PostgreSQL.  For parameters where "-1" is a 
real setting that has meaning (e.g. log_min_duration_statement), then it should 
return "-1".

I presume that as a part of running the server that we have already decoded 
what the active values should be, so I'm asking if we can expose this data via 
the pg_settings view?

Regards
Greg Clough

https://ipreo.com


********* Confidential Disclaimer *********

This e-mail message and any attachments are confidential. Dissemination, 
distribution or copying of this e-mail or any attachments by anyone other than 
the intended recipient is prohibited. If you are not the intended recipient, 
please notify Ipreo immediately by replying to this e-mail, and destroy all 
copies of this e-mail and any attachments. If you have received this e-mail as 
part of a marketing communication and you would like to unsubscribe from future 
marketing communications, please review our privacy 
policy<http://info.ipreo.com/Ipreo-Private-Policy.html> for more information.









Reply via email to