subscriptions as a replication start point. It guarantees that no
transaction will be lost.
</para>
</step>
<step>
<para>
Write recovery parameters into the target data directory and restart the
target server. It specifies an LSN (<xref
linkend="guc-recovery-target-lsn"/>) of the write-ahead log location up
to which recovery will proceed. It also specifies
<literal>promote</literal> as the action that the server should take
once the recovery target is reached. Additional <link
linkend="runtime-config-wal-recovery-target">recovery parameters</link>
are added to avoid unexpected behavior during the recovery process such
as end of the recovery as soon as a consistent state is reached (WAL
should be applied until the replication start location) and multiple
recovery targets that can cause a failure. This step finishes once the
server ends standby mode and is accepting read-write transactions. If
<option>--recovery-timeout</option> option is set,
<application>pg_createsubscriber</application> terminates if recovery
does not end until the given number of seconds.
</para>
</step>
<step>
<para>
Create a subscription for each specified database on the target server.
If the <option>--subscription</option> option is not specified, the
subscription has the following name pattern:
<quote><literal>pg_createsubscriber_%u_%x</literal></quote> (parameters:
database <parameter>oid</parameter>, random <parameter>int</parameter>).
It does not copy existing data from the source server. It does not
create a replication slot. Instead, it uses the replication slot that
was created in a previous step. The subscription is created but it is
not enabled yet. The reason is the replication progress must be set to
the replication start point before starting the replication.
</para>
</step>
<step>
<para>
Drop publications on the target server that were replicated because they
were created before the replication start location. It has no use on
the subscriber.