Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2a71206

Browse files
committed
Remove pg_dump's --no-synchronized-snapshots switch.
Server versions for which there was a plausible reason touse this switch are all out of support now. Leaving itaround would accomplish little except to let careless DBAsshoot themselves in the foot.Discussion:https://postgr.es/m/556122.1639520324@sss.pgh.pa.us
1 parentbf9a55c commit2a71206

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

‎doc/src/sgml/ref/pg_dump.sgml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ PostgreSQL documentation
387387
but to abort the dump.
388388
</para>
389389
<para>
390-
For a consistent backup, the database server needs to support
390+
To perform a parallel dump, the database server needs to support
391391
synchronized snapshots, a feature that was introduced in
392392
<productname>PostgreSQL</productname> 9.2 for primary servers and 10
393393
for standbys. With this feature, database clients can ensure they see
@@ -931,18 +931,6 @@ PostgreSQL documentation
931931
</listitem>
932932
</varlistentry>
933933

934-
<varlistentry>
935-
<term><option>--no-synchronized-snapshots</option></term>
936-
<listitem>
937-
<para>
938-
This option allows running <command>pg_dump -j</command> against a
939-
pre-v10 standby server, at the cost of possibly producing an
940-
inconsistent dump. See the documentation of the <option>-j</option>
941-
parameter for more details.
942-
</para>
943-
</listitem>
944-
</varlistentry>
945-
946934
<varlistentry>
947935
<term><option>--no-tablespaces</option></term>
948936
<listitem>

‎src/bin/pg_dump/pg_backup.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ typedef struct _dumpOptions
175175
intno_security_labels;
176176
intno_publications;
177177
intno_subscriptions;
178-
intno_synchronized_snapshots;
179178
intno_toast_compression;
180179
intno_unlogged_table_data;
181180
intserializable_deferrable;

‎src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ main(int argc, char **argv)
394394
{"no-publications", no_argument, &dopt.no_publications, 1},
395395
{"no-security-labels", no_argument, &dopt.no_security_labels, 1},
396396
{"no-subscriptions", no_argument, &dopt.no_subscriptions, 1},
397-
{"no-synchronized-snapshots", no_argument, &dopt.no_synchronized_snapshots, 1},
398397
{"no-toast-compression", no_argument, &dopt.no_toast_compression, 1},
399398
{"no-unlogged-table-data", no_argument, &dopt.no_unlogged_table_data, 1},
400399
{"no-sync", no_argument, NULL, 7},
@@ -1029,7 +1028,6 @@ help(const char *progname)
10291028
printf(_(" --no-publications do not dump publications\n"));
10301029
printf(_(" --no-security-labels do not dump security label assignments\n"));
10311030
printf(_(" --no-subscriptions do not dump subscriptions\n"));
1032-
printf(_(" --no-synchronized-snapshots do not use synchronized snapshots in parallel jobs\n"));
10331031
printf(_(" --no-tablespaces do not dump tablespace assignments\n"));
10341032
printf(_(" --no-toast-compression do not dump TOAST compression methods\n"));
10351033
printf(_(" --no-unlogged-table-data do not dump unlogged table data\n"));
@@ -1211,15 +1209,10 @@ setup_connection(Archive *AH, const char *dumpencoding,
12111209
ExecuteSqlStatement(AH, query->data);
12121210
destroyPQExpBuffer(query);
12131211
}
1214-
else if (AH->numWorkers > 1 &&
1215-
!dopt->no_synchronized_snapshots)
1212+
else if (AH->numWorkers > 1)
12161213
{
12171214
if (AH->isStandby && AH->remoteVersion < 100000)
1218-
fatal("Synchronized snapshots on standby servers are not supported by this server version.\n"
1219-
"Run with --no-synchronized-snapshots instead if you do not need\n"
1220-
"synchronized snapshots.");
1221-
1222-
1215+
fatal("parallel dumps from standby servers are not supported by this server version");
12231216
AH->sync_snapshot_id = get_synchronized_snapshot(AH);
12241217
}
12251218
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp