another idea for changing global configuration settings from SQL - Mailing list pgsql-hackers

From Peter Eisentraut
Subject another idea for changing global configuration settings from SQL
Date
Msg-id 50A52C0B.9080505@gmx.net
Whole thread Raw
Responses Re: another idea for changing global configuration settings from SQL  (Robert Haas <robertmhaas@gmail.com>)
Re: another idea for changing global configuration settings from SQL  (Cédric Villemain <cedric@2ndquadrant.com>)
Re: another idea for changing global configuration settings from SQL  (Josh Berkus <josh@agliodbs.com>)
Re: another idea for changing global configuration settings from SQL  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Re: another idea for changing global configuration settings from SQL  (Magnus Hagander <magnus@hagander.net>)
Re: another idea for changing global configuration settings from SQL  (Peter Eisentraut <peter_e@gmx.net>)
Re: another idea for changing global configuration settings from SQL  (Fujii Masao <masao.fujii@gmail.com>)
Re: another idea for changing global configuration settings from SQL  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Independent of the discussion of how to edit configuration files from
SQL, I had another idea how many of the use cases for this could be handled.

We already have the ability to store in pg_db_role_setting configuration
settings for

specific user, specific database
specific user, any database
any user, specific database

The existing infrastructure would also support

any user, any database (= all the time)

All you'd need is to add

ApplySetting(InvalidOid, InvalidOid, relsetting, PGC_S_$SOMETHING);

in postinit.c, and have some SQL command to modify this setting.

The only thing you couldn't handle that way are SIGHUP settings, but the
often-cited use cases work_mem, logging, etc. would work.

There would also be the advantage that pg_dumpall would save these settings.

Thoughts?



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: tuplesort memory usage: grow_memtuples
Next
From: Kohei KaiGai
Date:
Subject: Re: [v9.3] writable foreign tables