Robert Haas <robertmh...@gmail.com> writes: > That's probably not going to happen until we have a way to update > postgresql.conf via SQL. Which, I maintain, as I have maintained > before, is not going to happen until we get rid of the comments, > because otherwise absolutely any implementation anyone proposes will > get criticized for failing to handle them sensibly (because it is not > possible to rewrite the file while handling the comments sensibly).
I'm sorry but you don't need to get rid of the comments *at all* to have the facility to update configuration from SQL. What you need to do is make the choice that the setup is either human friendly or SQL friendly. You will lose something that you now have to be able to use SQL commands to edit the setup. Re-read. Ready now? So, what you do is have a file per GUC, file name is the GUC name, first line contains *ONLY* current value, the rest of the file is comments. Note that it's still possible to hand-edit your setup. It's not even hard to do. If you prefer a single file without comments, it's even trivial to come up with a script that prepares the machine friendly layout. And it's even possible to offer DBAs a choice here: if postgresql.conf exists, it's used in the old way and the SQL command only issues errors, if there's a postgresql.conf.d and no postgresql.conf, the SQL commands are working fine. Add an option for initdb to choose one layout or the other. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers