Re: Proposal for Allow postgresql.conf values to be changed via SQL - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Proposal for Allow postgresql.conf values to be changed via SQL
Date
Msg-id 50904E71.1050700@2ndQuadrant.com
Whole thread Raw
In response to Re: Proposal for Allow postgresql.conf values to be changed via SQL  (Amit Kapila <amit.kapila@huawei.com>)
Responses Re: Proposal for Allow postgresql.conf values to be changed via SQL
List pgsql-hackers
On 10/29/2012 03:14 PM, Amit Kapila wrote:

 

On Monday, October 29, 2012 7:11 PM Chris Corbyn

> What's the use case of this? It sounds like it will just create a maintenance nightmare where some stuff you expect to lookup in in postgresql.conf is actually hiding in the .auto file. Assuming only super users/sysadmins would have the ability to change things in the config file, wouldn't they be more likely to just do it on the server and edit the .conf (which among other things, keeps it tidy and orderly).

 

Basically after this user will have 2 options to change the postgresql.conf parameters.

One is by directly editing the postgresql.conf file and

Other is by using SQL commands.

There will be nothing hidden in .auto file, it’s just that it will create separate file for parameters set by SQL command to avoid the hassles of parsing the postgresql.conf during the processing of SQL command.

If interested I have somewhere pl/pythhonu functions for both looking at and
changing parameters in postgresql.conf file,

It even keeps the old value and adds comments both to old and to the new one abot who an when changed it.
Could also be extended to fpr example rotate last 10 postgreSQL conf files and/or skip rewriting the file in case the effective value of GUC did not change.

Cheers,
Hannu

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Limiting the number of parameterized indexpaths created
Next
From: Christian Kruse
Date:
Subject: Re: Re: [HACKERS] Patch für MAP_HUGETLB for mmap()shared memory