postgresql_16:9.6.38.8 Configuration Parameters
PostgreSQL 16 > Appendixes > Additional Supplied Modules and Extensions > postgres_fdw — access data stored in external PostgreSQL servers > Configuration Parameters
postgres_fdw.application_name (string)
Specifies a value for (see guc-application-name) configuration parameter used when postgres_fdw establishes a connection to a foreign server. This overrides application_name option of the server object. Note that change of this parameter doesn't affect any existing connections until they are re-established.
postgres_fdw.application_name can be any string of any length and contain even non-ASCII characters. However when it's passed to and used as application_name in a foreign server, note that it will be truncated to less than NAMEDATALEN characters. Anything other than printable ASCII characters are replaced with C-style hexadecimal escapes (see postgresql_16:3.1.1.2). See (see guc-application-name) for details.
% characters begin “escape sequences” that are replaced with status information as outlined below. Unrecognized escapes are ignored. Other characters are copied straight to the application name. Note that it's not allowed to specify a plus/minus sign or a numeric literal after the % and before the option, for alignment and padding.
| Escape | Effect | | --- | --- | | %a | Application name on local server | | %c | Session ID on local server (see (see guc-log-line-prefix) for details) | | %C | Cluster name on local server (see (see guc-cluster-name) for details) | | %u | User name on local server | | %d | Database name on local server | | %p | Process ID of backend on local server | | %% | Literal % |
For example, suppose user local_user establishes a connection from database local_db to foreign_db as user foreign_user, the setting 'db=%d, user=%u' is replaced with 'db=local_db, user=local_user'.