mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
pg_dump: Always dump subscriptions NOCONNECT
This removes the pg_dump option --no-subscription-connect and makes it the default. Dumping a subscription so that it activates right away when restored is not very useful, because the state of the publication server is unclear. Discussion: https://www.postgresql.org/message-id/e4fbfad5-c6ac-fd50-6777-18c84b34eb2f@2ndquadrant.com
This commit is contained in:
@ -798,19 +798,6 @@ PostgreSQL documentation
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--no-subscription-connect</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
When dumping logical replication subscriptions,
|
||||
generate <command>CREATE SUBSCRIPTION</command> commands that do not
|
||||
make remote connections for creating replication slot or initial table
|
||||
copy. That way, the dump can be restored without requiring network
|
||||
access to the remote servers.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--no-synchronized-snapshots</></term>
|
||||
<listitem>
|
||||
@ -1235,6 +1222,19 @@ CREATE DATABASE foo WITH TEMPLATE template0;
|
||||
in cross-version cases, as it can prevent problems arising from varying
|
||||
reserved-word lists in different <productname>PostgreSQL</> versions.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When dumping logical replication subscriptions,
|
||||
<application>pg_dump</application> will generate <command>CREATE
|
||||
SUBSCRIPTION</command> commands that use the <literal>NOCONNECT</literal>
|
||||
option, so that restoring the subscription does not make remote connections
|
||||
for creating a replication slot or for initial table copy. That way, the
|
||||
dump can be restored without requiring network access to the remote
|
||||
servers. It is then up to the user to reactivate the subscriptions in a
|
||||
suitable way. If the involved hosts have changed, the connection
|
||||
information might have to be changed. It might also be appropriate to
|
||||
truncate the target tables before initiating a new full table copy.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id="pg-dump-examples">
|
||||
|
Reference in New Issue
Block a user