Remove pg_dump's --no-synchronized-snapshots switch.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 15 Dec 2021 23:44:47 +0000 (18:44 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 15 Dec 2021 23:44:47 +0000 (18:44 -0500)
Server versions for which there was a plausible reason to
use this switch are all out of support now.  Leaving it
around would accomplish little except to let careless DBAs
shoot themselves in the foot.

Discussion: https://postgr.es/m/556122.1639520324@sss.pgh.pa.us

doc/src/sgml/ref/pg_dump.sgml
src/bin/pg_dump/pg_backup.h
src/bin/pg_dump/pg_dump.c

index 96cbc76e79f57fc9f77b52e50f6ebabeaa413c5a..0e1cfe0f8d698be2dc4dc2b46106f6a6ff744748 100644 (file)
@@ -387,7 +387,7 @@ PostgreSQL documentation
         but to abort the dump.
        </para>
        <para>
-        For a consistent backup, the database server needs to support
+        To perform a parallel dump, the database server needs to support
         synchronized snapshots, a feature that was introduced in
         <productname>PostgreSQL</productname> 9.2 for primary servers and 10
         for standbys. With this feature, database clients can ensure they see
@@ -931,18 +931,6 @@ PostgreSQL documentation
       </listitem>
      </varlistentry>
 
-     <varlistentry>
-      <term><option>--no-synchronized-snapshots</option></term>
-      <listitem>
-       <para>
-        This option allows running <command>pg_dump -j</command> against a
-        pre-v10 standby server, at the cost of possibly producing an
-        inconsistent dump.  See the documentation of the <option>-j</option>
-        parameter for more details.
-       </para>
-      </listitem>
-     </varlistentry>
-
      <varlistentry>
       <term><option>--no-tablespaces</option></term>
       <listitem>
index d3aac0dbdf8fe0c7c1ee6f9baa937a4bb356062f..753252e05e0c1f7b66e2476b664f33c85f4bfbae 100644 (file)
@@ -175,7 +175,6 @@ typedef struct _dumpOptions
        int                     no_security_labels;
        int                     no_publications;
        int                     no_subscriptions;
-       int                     no_synchronized_snapshots;
        int                     no_toast_compression;
        int                     no_unlogged_table_data;
        int                     serializable_deferrable;
index 326441a76a0af5dc66325620889132c7c1624efc..15dae8bd88e5c60412f9abb113094b1035d75246 100644 (file)
@@ -394,7 +394,6 @@ main(int argc, char **argv)
                {"no-publications", no_argument, &dopt.no_publications, 1},
                {"no-security-labels", no_argument, &dopt.no_security_labels, 1},
                {"no-subscriptions", no_argument, &dopt.no_subscriptions, 1},
-               {"no-synchronized-snapshots", no_argument, &dopt.no_synchronized_snapshots, 1},
                {"no-toast-compression", no_argument, &dopt.no_toast_compression, 1},
                {"no-unlogged-table-data", no_argument, &dopt.no_unlogged_table_data, 1},
                {"no-sync", no_argument, NULL, 7},
@@ -1029,7 +1028,6 @@ help(const char *progname)
        printf(_("  --no-publications            do not dump publications\n"));
        printf(_("  --no-security-labels         do not dump security label assignments\n"));
        printf(_("  --no-subscriptions           do not dump subscriptions\n"));
-       printf(_("  --no-synchronized-snapshots  do not use synchronized snapshots in parallel jobs\n"));
        printf(_("  --no-tablespaces             do not dump tablespace assignments\n"));
        printf(_("  --no-toast-compression       do not dump TOAST compression methods\n"));
        printf(_("  --no-unlogged-table-data     do not dump unlogged table data\n"));
@@ -1211,15 +1209,10 @@ setup_connection(Archive *AH, const char *dumpencoding,
                ExecuteSqlStatement(AH, query->data);
                destroyPQExpBuffer(query);
        }
-       else if (AH->numWorkers > 1 &&
-                        !dopt->no_synchronized_snapshots)
+       else if (AH->numWorkers > 1)
        {
                if (AH->isStandby && AH->remoteVersion < 100000)
-                       fatal("Synchronized snapshots on standby servers are not supported by this server version.\n"
-                                 "Run with --no-synchronized-snapshots instead if you do not need\n"
-                                 "synchronized snapshots.");
-
-
+                       fatal("parallel dumps from standby servers are not supported by this server version");
                AH->sync_snapshot_id = get_synchronized_snapshot(AH);
        }
 }