↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Configuration Parameters

log_parameter_max_length

If greater than zero, each bind parameter value logged with a non-error statement-logging message is trimmed to this many bytes. Zero disables logging of bind parameters for non-error statement logs. -1 (the default) allows bind parameters to be logged in full. If this value is specified without units, it is taken as bytes. Only superusers and users with the appropriate SET privilege can change this setting. This setting only affects log messages printed as a result of log_statement, log_min_duration_statement, and related settings. Non-zero values of this setting add some overhead, particularly if parameters are sent in binary form, since then conversion to text is required.

English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

boot val
-1
category
Reporting and Logging / What to Log
context
superuser
doc same as
Unknown
documented
true
enumvals
Unknown
extra desc
-1 means log values in full.
lang
en
max val
1073741823
metadata version
18
min val
-1
name
log_parameter_max_length
short desc
Sets the maximum length in bytes of data logged for bind parameter values when logging statements.
source
pg-settings-source-snapshot
unit
B
vartype
integer

Definition PG 18

If greater than zero, each bind parameter value logged with a non-error statement-logging message is trimmed to this many bytes. Zero disables logging of bind parameters for non-error statement logs. -1 (the default) allows bind parameters to be logged in full. If this value is specified without units, it is taken as bytes. Only superusers and users with the appropriate SET privilege can change this setting.

This setting only affects log messages printed as a result of log_statement, log_min_duration_statement, and related settings. Non-zero values of this setting add some overhead, particularly if parameters are sent in binary form, since then conversion to text is required.

Compare versions

Complete source facts

doc html

<p>
        If greater than zero, each bind parameter value logged with a
        non-error statement-logging message is trimmed to this many bytes.
        Zero disables logging of bind parameters for non-error statement logs.
        <code class="literal">-1</code> (the default) allows bind parameters to be
        logged in full.
        If this value is specified without units, it is taken as bytes.
        Only superusers and users with the appropriate <code class="literal">SET</code>
        privilege can change this setting.
       </p><p>
        This setting only affects log messages printed as a result of
        <a class="xref" href="/docs/18/runtime-config-logging.html#GUC-LOG-STATEMENT">log_statement</a>,
        <a class="xref" href="/docs/18/runtime-config-logging.html#GUC-LOG-MIN-DURATION-STATEMENT">log_min_duration_statement</a>, and related settings.
        Non-zero values of this setting add some overhead, particularly
        if parameters are sent in binary form, since then conversion to
        text is required.
       </p>

documentation revision

{"inputs":[{"file":"runtime-config-logging.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","version":"18.7"},{"file":"runtime-config-logging.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"68c010254e1859ec0b76f06a563babd51a6c38997f1242e35e4c6b649724b1cb","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:c613c97863ce5e2de645a9ba11140b8f60709333bc38e8b190639b657a7da59a

Text language: en · wiki-repair-20261023:c613c97863ce5e2de645a9ba11140b8f60709333bc38e8b190639b657a7da59a