Re: Clarify log_parameter_max_length docs regarding log_min_duration_statement vs log_duration

From: surya poondla <suryapoondla4(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Clarify log_parameter_max_length docs regarding log_min_duration_statement vs log_duration
Date: 2026-07-13 19:05:10
Message-ID: CAOVWO5onzDm4oBx+VSdHZM+_nhiHi07rS9M72Y=9-DTUkmCs3A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Hi Fujii,

The current wording in the docs is misleading. +1 to the patch for
correcting it.
log_parameter_max_length only affects the "Parameters: ..." line that
appears alongside logged statements in the server log.
That line is never emitted when only log_duration is turned on. It only
shows up when log_min_duration_statement (or a sample-rate variant) is what
causes the statement to be logged.
So the change looks accurate.

(Pointer for anyone tracing it: log_parameter_max_length is read only
inside errdetail_params(), and the log_duration-
only path through check_log_duration() the return-1 arm never routes
through it.)

Two small questions:

1. log_min_duration_sample and log_transaction_sample_rate also cause
"Parameters:" lines to be emitted, and are therefore
also affected by log_parameter_max_length. "and related settings" arguably
covers them, but if we want the enumeration to be more
precise than before, would it be worth naming them explicitly? Either way
is fine just curious about the rationale.

2. This wording was introduced in 0b34e7d307e and is in every supported
branch. Should this be back patched?

Regards,
Surya Poondla

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Fujii Masao 2026-07-15 11:08:16 Re: Clarify log_parameter_max_length docs regarding log_min_duration_statement vs log_duration
Previous Message Laurenz Albe 2026-07-13 14:42:05 Re: Suggestion to improve PostgreSQL documentation clarity