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

Commit7ad60b4

Browse files
committed
Fixup pg_dumpall adding --lock-wait-timeout, to match pg_dump.
David Gould
1 parent4571185 commit7ad60b4

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

‎doc/src/sgml/ref/pg_dumpall.sgml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.72 2008/04/13 03:49:21 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.73 2008/08/29 17:28:43 alvherre Exp $
33
PostgreSQL documentation
44
-->
55

@@ -195,6 +195,22 @@ PostgreSQL documentation
195195
</listitem>
196196
</varlistentry>
197197

198+
<varlistentry>
199+
<term><option>--lock-wait-timeout=<replaceable class="parameter">timeout</replaceable></option></term>
200+
<listitem>
201+
<para>
202+
Do not wait forever to acquire shared table locks at the beginning of
203+
the dump. Instead fail if unable to lock a table within the specified
204+
<replaceable class="parameter">timeout</>. The timeout may be
205+
specified in any of the formats accepted by <command>SET
206+
statement_timeout</>. (Allowed values vary depending on the server
207+
version you are dumping from, but an integer number of milliseconds
208+
is accepted by all versions since 7.3. This option is ignored when
209+
dumping from a pre-7.3 server.)
210+
</para>
211+
</listitem>
212+
</varlistentry>
213+
198214
<varlistentry>
199215
<term><option>--no-tablespaces</option></term>
200216
<listitem>

‎src/bin/pg_dump/pg_dumpall.c

Lines changed: 9 additions & 1 deletion
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.105 2008/06/26 01:35:45 momjian Exp $
9+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.106 2008/08/29 17:28:43 alvherre Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -120,6 +120,7 @@ main(int argc, char *argv[])
120120
{"disable-triggers",no_argument,&disable_triggers,1},
121121
{"no-tablespaces",no_argument,&no_tablespaces,1},
122122
{"use-set-session-authorization",no_argument,&use_setsessauth,1},
123+
{"lock-wait-timeout",required_argument,NULL,2},
123124

124125
{NULL,0,NULL,0}
125126
};
@@ -305,6 +306,11 @@ main(int argc, char *argv[])
305306
case0:
306307
break;
307308

309+
case2:
310+
appendPQExpBuffer(pgdumpopts," --lock-wait-timeout=");
311+
appendPQExpBuffer(pgdumpopts,optarg);
312+
break;
313+
308314
default:
309315
fprintf(stderr,_("Try \"%s --help\" for more information.\n"),progname);
310316
exit(1);
@@ -488,6 +494,8 @@ help(void)
488494
printf(_(" -f, --file=FILENAME output file name\n"));
489495
printf(_(" --help show this help, then exit\n"));
490496
printf(_(" --version output version information, then exit\n"));
497+
printf(_(" --lock-wait-timeout=TIMEOUT\n"
498+
" fail after waiting TIMEOUT for a table lock\n"));
491499
printf(_("\nOptions controlling the output content:\n"));
492500
printf(_(" -a, --data-only dump only the data, not the schema\n"));
493501
printf(_(" -c, --clean clean (drop) databases prior to create\n"));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp