Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tk95p-000b3X-Pw for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Feb 2025 21:55:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tk95o-003pYb-HH for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Feb 2025 21:55:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tk95o-003pYS-7p for pgsql-hackers@lists.postgresql.org; Mon, 17 Feb 2025 21:55:56 +0000 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tk95m-001Qm5-0v for pgsql-hackers@postgresql.org; Mon, 17 Feb 2025 21:55:55 +0000 Received: by mail-io1-xd35.google.com with SMTP id ca18e2360f4ac-855a4024edeso7121839f.0 for ; Mon, 17 Feb 2025 13:55:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739829353; x=1740434153; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=NF8XL+HxSzvxxaiVjDw5SL/bN54AAIRqv3HFt2nHrVQ=; b=lItbpLqQnK1d8Vyy2G1qNsDQsI2DC2JHyskN3xri62zh5wRnPH2lHobmbNYOhkhdOq 10zxSn61TiWDsM4LrOeTbltTeOgyv1Nprv3BArs1q9Gz5vRRqeT+ad1KL97l4yTPmFl4 qvPOBQPn5lPnsv8r3yEyGDKceBBh0+3SmU7lgdTNI1KRVtneHpM4dSdyjW6XcYIgImX6 1izo8c5KQhU0O0hvalT9/ZH76lveBuQx7lXALtpNidyXl9ULOkBwHeHu4DvEAR2gZ07V Pva09vJvGYVSI5Nd7fMpDP3wcKmQvH/IDIisrlQky0QDne7KbM5vRAHr0wrJPX9Ff5sS 5LFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739829353; x=1740434153; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NF8XL+HxSzvxxaiVjDw5SL/bN54AAIRqv3HFt2nHrVQ=; b=N3l3ap3Xr7AjfHi3WN6H1EdIZzQZwwKbcUIDaGHfyd2bwbReLqJxm9o3xmd9GHT+W9 Xy31w+fgNE+wgqCFclkua+/LU4XeDWaeO43GjhfgYLEpibX4j8uHmecouVbDe8k7mhPq G4fSe3p3WitYa7quhDecBewkd/rENjvM/ftgt/IWfba+eD1sGNqKXmmD8IqQo5YhNCcC gw3O5/2VKkfW9jl3N38KkeSMYm6WeLk45XKZouUhF35aigLSB+nXNVhSXZTKCzcGi+lu d3cDChbyTkpW7MGvkN3TJyQT1UI/9h9pE5ArcbelB3EaLCFTnRmuz6T3v0v/1RK2ltaS C+Dw== X-Forwarded-Encrypted: i=1; AJvYcCVZ5tKcyY9H3ofiSiRA0zQPWjp+5U29hePAKv76Ok4erUucjmb5/YBUZ4tbWp7qtgRur1F2iKdl7IgYTeo4@postgresql.org X-Gm-Message-State: AOJu0YzZQgEOwCbdhb4nL9bxSfHav37xv/7S9zNWuFCc99Yv7/2q7H3v 1gKZuHWEyJoN70mxfN/PovVtcqQq+5jNBsOt+yPNn0JAx7TYFwFwng4PZg== X-Gm-Gg: ASbGncv9R6R9L1BvqCn7m9myBeifIUOedQH6NRA3vr+qXyE96LIgv47e4yOuq1NhEp2 nC0kGgz8lLcojgAei7syHm9Pzl1jT79/w1IkktNFZ+aOoIJ89zXGyH0KZ8v/9paQ1++0EBh44gt XHNhDwzKIleHY/h8YY0r1bDX6FtvlwvJ8xIqIfqXEJTNrpZi/cMGILG00k+kaDynkJ49+qwIZln 4n6dfuK39bLjLZSD2fVrTETO4qchlPTZgvPcX07ypnwyi1R1asK70ySrkLgMZRWKutVbgH86FP/ HPwR/YwjhyvvCCNzQuDHmPF1Zyzu2tI737u5/mxmq3ZYoB3Ua7FHF9bCpfpYz1sHSYDHmlVC2y5 xTsWN9A== X-Google-Smtp-Source: AGHT+IG36Dx2EaVcl+r1xZtwVUKet2f64EO/7gXy+1qI/mZ84Fh9rvTRWKZurpuV3J80POBKSRuIRg== X-Received: by 2002:a05:6602:4a07:b0:855:95a1:91a6 with SMTP id ca18e2360f4ac-85595a19303mr400325539f.3.1739829352738; Mon, 17 Feb 2025 13:55:52 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4eea1ff4c6fsm446276173.59.2025.02.17.13.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 13:55:52 -0800 (PST) Date: Mon, 17 Feb 2025 15:55:50 -0600 From: Nathan Bossart To: Peter Smith Cc: Ilia Evdokimov , "David G. Johnston" , Daniel Gustafsson , PostgreSQL Hackers Subject: Re: describe special values in GUC descriptions more consistently Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Feb 18, 2025 at 08:14:58AM +1100, Peter Smith wrote: > SUGGESTION > "-1 disables logging plans. 0 means log all plans." +1 > DefineCustomIntVariable("auto_explain.log_parameter_max_length", > "Sets the maximum length of query parameters to log.", > - "Zero logs no query parameters, -1 logs them in full.", > + "0 logs no query parameters, -1 logs them in full.", > > SUGGESTION #1 (main description part) > In fact that whole description seems incompatible with the > documentation. IMO it should be "Sets the maximum length of query > parameter VALUES to log.". I'm not sure omitting "values" changes the meaning in any discernible way, but I'm not opposed to adding it. > SUGGESTION #2 (special value part) > "-1 disables logging parameter values." > OR > "-1 disables logging parameter values. 0 means log parameter values in full" > > TBH, I am unsure if this one should even mention the value 0 because > there are already examples of "max" GUCs similar to this that say > nothing about 0 since the meaning should be clear. > e.g. log_parameter_max_length doesn't mention 0. > e.g. log_parameter_max_length_on_error doesn't mention 0. I think you've got the meanings swapped here. It should be: -1 means log parameter values in full. 0 disables logging parameter values. But I agree that we can omit the description for 0 here. -- nathan