Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 112392E002F for ; Fri, 6 Jun 2008 03:08:40 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 87703-01 for ; Fri, 6 Jun 2008 03:08:18 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail01.enterprisedb.com (webmail.enterprisedb.com [63.246.7.168]) by developer.postgresql.org (Postfix) with ESMTP id E19A02E0050 for ; Fri, 6 Jun 2008 03:08:11 -0300 (ADT) thread-index: AcjHm83P4TUNNLnfQVCMGDHN5qAtFg== Received: from [80.223.222.186] ([80.223.222.186]) by mail01.enterprisedb.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 6 Jun 2008 02:08:56 -0400 Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133 Message-ID: <4848D447.10005@enterprisedb.com> Date: Fri, 06 Jun 2008 09:08:07 +0300 From: "Heikki Linnakangas" Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509) MIME-Version: 1.0 To: "David E. Wheeler" Cc: "Greg Smith" , "Aidan Van Dyk" , Subject: Re: Overhauling GUCS References: <29525.1212613052@sss.pgh.pa.us> <48472E47.7030701@dunslane.net> <20080605162400.GF16502@alvh.no-ip.org> <48481CBF.6040602@enterprisedb.com> <48481E3A.4010306@hagander.net> <20080605174209.GL16502@alvh.no-ip.org> <20080605212129.GI14498@yugib.highrise.ca> <3F927D52-A0FD-4575-8D24-F0F70C459235@kineticode.com> In-Reply-To: <3F927D52-A0FD-4575-8D24-F0F70C459235@kineticode.com> Content-Type: text/plain; format=flowed; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Jun 2008 06:08:56.0593 (UTC) FILETIME=[CDC18810:01C8C79B] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200806/269 X-Sequence-Number: 119382 David E. Wheeler wrote: > On Jun 5, 2008, at 14:47, Greg Smith wrote: > >> This is why there's the emphasis on preserving comments as they pass >> into the GUC structure and back to an output file. This is one of the >> implementation details I haven't fully made up my mind on: how to >> clearly label user comments in the postgresql.conf to distinguish them >> from verbose ones added to the file. I have no intention of letting >> manual user edits go away; what I'm trying to do here (and this part >> is much more me than Josh) is make them more uniform such that they >> can co-exist with machine edits without either stomping on the other. >> Right now doing that is difficult, because it's impossible to tell the >> default comments from the ones the users added and the current comment >> structure bleeds onto the same lines as the settings. > > How about a simple rule, such as that machine-generated comments start > with "##", while user comments start with just "#"? I think that I've > seen such a rule used before. At any rate, I think that, unless you have > some sort of line marker for machine-generated comments, there will be > no way to tell them apart from user comments. What comments do we consider machine-generated? Just the ones used to comment out settings, like #shared_buffers = 32MB or something else? If the automatic tool lets alone all other kind of comments, I think we're fine. In fact, it wouldn't necessarily need to modify those comments either, it could simply add a new setting line below that: #shared_buffers = 32MB shared_buffers = 1024MB For extra safety, it could comment out old settings, perhaps with something like this: #shared_buffers = 32MB #shared_buffers = 1024MB # commented out by wizard on 2008-06-05 shared_buffers = 2048MB This would preserve a full change history in the file. It would become quite messy after a lo of changes, of course, but a user can trim the history by hand if he wants to. Or perhaps we should explicitly mark the settings the tool has generated, and comment out: #shared_buffers = 32MB # commented out by wizard on 2008-06-05 shared_buffers = 1024MB # automatically set by wizard on 2008-06-05 That way the tool could safely replace automatically set settings, without replacing manually set ones without leaving a clear trace of what happened. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com