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

Commitc22de39

Browse files
committed
Strengthen warnings about using pg_dump's -i option.
1 parent530659f commitc22de39

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
lines changed

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.99 2008/03/20 17:36:57 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.100 2008/03/26 14:32:22 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -296,19 +296,18 @@ PostgreSQL documentation
296296
<term><option>--ignore-version</></term>
297297
<listitem>
298298
<para>
299-
Ignore versionmismatch between
299+
Ignoreincompatibleversioncheck between
300300
<application>pg_dump</application> and the database server.
301301
</para>
302302

303303
<para>
304-
<application>pg_dump</application> can dump from servers running
305-
previous releases of <productname>PostgreSQL</>, but very old
306-
versions are not supported anymore (currently, those prior to 7.0).
307304
Dumping from a server newer than <application>pg_dump</application>
308-
is likely not to work at all.
309-
Use this option if you need to override the version check (and
310-
if <application>pg_dump</application> then fails, don't say
311-
you weren't warned).
305+
is likely fail and is disabled by default.
306+
Also, while <application>pg_dump</application> can dump from servers running
307+
previous releases of <productname>PostgreSQL</>, some very old
308+
versions are not supported (currently, pre-7.0).
309+
Use this option if you need to override the version check, but
310+
be prepared for <application>pg_dump</application> to fail.
312311
</para>
313312
</listitem>
314313
</varlistentry>

‎src/bin/pg_dump/pg_backup_db.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*Implements the basic DB functions used by the archiver.
66
*
77
* IDENTIFICATION
8-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.77 2007/12/09 19:01:40 tgl Exp $
8+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.78 2008/03/26 14:32:22 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -72,9 +72,10 @@ _check_database_version(ArchiveHandle *AH, bool ignoreVersion)
7272
write_msg(NULL,"server version: %s; %s version: %s\n",
7373
remoteversion_str,progname,PG_VERSION);
7474
if (ignoreVersion)
75-
write_msg(NULL,"proceeding despite version mismatch\n");
75+
write_msg(NULL,"ignoring server version mismatch\n");
7676
else
77-
die_horribly(AH,NULL,"aborting because of version mismatch (Use the -i option to proceed anyway.)\n");
77+
die_horribly(AH,NULL,"aborting because of server version mismatch\n"
78+
"Use the -i option to bypass server version check, but be prepared for failure.\n");
7879
}
7980
}
8081

‎src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.483 2008/03/20 17:36:57 tgl Exp $
15+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.484 2008/03/26 14:32:22 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -745,8 +745,7 @@ help(const char *progname)
745745
printf(_("\nGeneral options:\n"));
746746
printf(_(" -f, --file=FILENAME output file name\n"));
747747
printf(_(" -F, --format=c|t|p output file format (custom, tar, plain text)\n"));
748-
printf(_(" -i, --ignore-version proceed even when server version mismatches\n"
749-
" pg_dump version\n"));
748+
printf(_(" -i, --ignore-version ignore server version mismatch\n"));
750749
printf(_(" -v, --verbose verbose mode\n"));
751750
printf(_(" -Z, --compress=0-9 compression level for compressed formats\n"));
752751
printf(_(" --help show this help, then exit\n"));

‎src/bin/pg_dump/pg_dumpall.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
88
*
9-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.102 2008/03/20 17:42:51 tgl Exp $
9+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.103 2008/03/26 14:32:22 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -488,8 +488,7 @@ help(void)
488488

489489
printf(_("\nGeneral options:\n"));
490490
printf(_(" -f, --file=FILENAME output file name\n"));
491-
printf(_(" -i, --ignore-version proceed even when server version mismatches\n"
492-
" pg_dumpall version\n"));
491+
printf(_(" -i, --ignore-version ignore server version mismatch\n"));
493492
printf(_(" --help show this help, then exit\n"));
494493
printf(_(" --version output version information, then exit\n"));
495494
printf(_("\nOptions controlling the output content:\n"));
@@ -1399,10 +1398,11 @@ connectDatabase(const char *dbname, const char *pghost, const char *pgport,
13991398
fprintf(stderr,_("server version: %s; %s version: %s\n"),
14001399
remoteversion_str,progname,PG_VERSION);
14011400
if (ignoreVersion)
1402-
fprintf(stderr,_("proceeding despite version mismatch\n"));
1401+
fprintf(stderr,_("ignoring server version mismatch\n"));
14031402
else
14041403
{
1405-
fprintf(stderr,_("aborting because of version mismatch (Use the -i option to proceed anyway.)\n"));
1404+
fprintf(stderr,_("aborting because of server version mismatch\n"
1405+
"Use the -i option to bypass server version check, but be prepared for failure.\n"));
14061406
exit(1);
14071407
}
14081408
}

‎src/bin/pg_dump/pg_restore.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*
3535
*
3636
* IDENTIFICATION
37-
*$PostgreSQL: pgsql/src/bin/pg_dump/pg_restore.c,v 1.86 2008/03/20 17:36:58 tgl Exp $
37+
*$PostgreSQL: pgsql/src/bin/pg_dump/pg_restore.c,v 1.87 2008/03/26 14:32:22 momjian Exp $
3838
*
3939
*-------------------------------------------------------------------------
4040
*/
@@ -378,7 +378,7 @@ usage(const char *progname)
378378
printf(_(" -d, --dbname=NAME connect to database name\n"));
379379
printf(_(" -f, --file=FILENAME output file name\n"));
380380
printf(_(" -F, --format=c|t specify backup file format\n"));
381-
printf(_(" -i, --ignore-versionproceed even whenserver versionmismatches\n"));
381+
printf(_(" -i, --ignore-versionignoreserver versionmismatch\n"));
382382
printf(_(" -l, --list print summarized TOC of the archive\n"));
383383
printf(_(" -v, --verbose verbose mode\n"));
384384
printf(_(" --help show this help, then exit\n"));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp