<command>INSERT</command>
statements with an <literal>ON CONFLICT DO NOTHING</literal> clause on
a foreign table, the remote server must be running
<productname>PostgreSQL</productname> 9.5 or later,
as earlier versions do not support this feature.
</para>
</sect2>
<sect2 id="postgres-fdw-wait-events">
<title>Wait Events</title>
<para>
<filename>postgres_fdw</filename> can report the following wait events
under the wait event type <literal>Extension</literal>:
</para>
<variablelist>
<varlistentry>
<term><literal>PostgresFdwCleanupResult</literal></term>
<listitem>
<para>
Waiting for transaction abort on remote server.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>PostgresFdwConnect</literal></term>
<listitem>
<para>
Waiting to establish a connection to a remote server.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>PostgresFdwGetResult</literal></term>
<listitem>
<para>
Waiting to receive the results of a query from a remote server.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="postgres-fdw-configuration-parameters">
<title>Configuration Parameters</title>
<variablelist>
<varlistentry id="guc-pgfdw-application-name" xreflabel="postgres_fdw.application_name">
<term>
<varname>postgres_fdw.application_name</varname> (<type>string</type>)
<indexterm>
<primary><varname>postgres_fdw.application_name</varname> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
Specifies a value for <xref linkend="guc-application-name"/>
configuration parameter used when <filename>postgres_fdw</filename>
establishes a connection to a foreign server. This overrides
<varname>application_name</varname> option of the server object.
Note that change of this parameter doesn't affect any existing
connections until they are re-established.
</para>
<para>
<varname>postgres_fdw.application_name</varname> can be any string
of any length and contain even non-ASCII characters. However when
it's passed to and used as <varname>application_name</varname>
in a foreign server, note that it will be truncated to less than
<symbol>NAMEDATALEN</symbol> characters.
Anything other than printable ASCII characters are replaced with <link
linkend="sql-syntax-strings-escape">C-style hexadecimal escapes</link>.
See <xref linkend="guc-application-name"/> for details.
</para>
<para>
<literal>%</literal> characters begin <quote>escape sequences</quote>
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 <literal>%</literal>
and before the option, for alignment and padding.
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Escape</entry>
<entry>Effect</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>%a</literal></entry>
<entry>Application name on local server</entry>
</row>
<row>
<entry><literal>%c</literal></entry>
<entry>
Session ID on local server
(see <xref linkend="guc-log-line-prefix"/> for details)
</entry>