↑↓ select↵ open⌫ change scopeOpen full search

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

Wiki / Configuration Parameters

application_name

The application_name can be any string of less than NAMEDATALEN characters (64 characters in a standard build). It is typically set by an application upon connection to the server. The name will be displayed in the pg_stat_activity view and included in CSV log entries. It can also be included in regular log entries via the log_line_prefix parameter. Only printable ASCII characters may be used in the application_name value. Other characters are replaced with C-style hexadecimal escapes.

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
Unknown
category
Reporting and Logging / What to Log
context
user
doc same as
Unknown
documented
true
enumvals
Unknown
extra desc
Unknown
lang
en
max val
Unknown
metadata version
18
min val
Unknown
name
application_name
short desc
Sets the application name to be reported in statistics and logs.
source
pg-settings-source-snapshot
unit
Unknown
vartype
string

Definition PG 18

The application_name can be any string of less than NAMEDATALEN characters (64 characters in a standard build). It is typically set by an application upon connection to the server. The name will be displayed in the pg_stat_activity view and included in CSV log entries. It can also be included in regular log entries via the log_line_prefix parameter. Only printable ASCII characters may be used in the application_name value. Other characters are replaced with C-style hexadecimal escapes.

Compare versions

Complete source facts

doc html

<p>
        The <code class="varname">application_name</code> can be any string of less than
        <code class="symbol">NAMEDATALEN</code> characters (64 characters in a standard build).
        It is typically set by an application upon connection to the server.
        The name will be displayed in the <code class="structname">pg_stat_activity</code> view
        and included in CSV log entries.  It can also be included in regular
        log entries via the <a class="xref" href="/docs/18/runtime-config-logging.html#GUC-LOG-LINE-PREFIX">log_line_prefix</a> parameter.
        Only printable ASCII characters may be used in the
        <code class="varname">application_name</code> value.
        Other characters are replaced with <a class="link" href="/docs/18/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE" title="4.1.2.2. String Constants with C-Style Escapes">C-style hexadecimal escapes</a>.
       </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:cd437d982b51236ce385514a6b679bb44a71231eca80f96a7966eb884ce8c804

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