Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Patches > Re: pg_dump loc...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 12 Topic 3705 of 4088
Post > Topic >>

Re: pg_dump lock timeout

by daveg@[EMAIL PROTECTED] (daveg) Jul 21, 2008 at 10:57 PM

--d6Gm4EdcadzBjdND
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, Jul 21, 2008 at 03:43:11AM -0400, Tom Lane wrote:
> daveg <daveg@[EMAIL PROTECTED]
> writes:
> > On Sun, Jul 20, 2008 at 02:50:50PM -0400, Tom Lane wrote:
> >> In most cases our policy has been that pg_dumpall should accept and
pass
> >> through any pg_dump option for which it's sensible to do so. I did
not
> >> make that happen but it seems it'd be a reasonable follow-on patch.
> 
> > I'll remember that next time.
> 
> Er .. actually that was a direct request for you to do it.

 
Attached is a the followon patch for pg_dumpall and docs to match pg_dump.

On a second topic, is anyone working on a parallel dump/load? I'd be
interested in helping.

-dg

-- 
David Gould       daveg@[EMAIL PROTECTED]
      510 536 1443    510 282 0869
If simplicity worked, the world would be overrun with insects.

--d6Gm4EdcadzBjdND
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pg-dumpall-timeout.patch"

*** a/doc/src/sgml/ref/pg_dumpall.sgml
--- b/doc/src/sgml/ref/pg_dumpall.sgml
***************
*** 196,201 **** PostgreSQL do***entation
--- 196,217 ----
       </varlistentry>
  
       <varlistentry>
+       <term><option>--lock-wait-timeout=<replaceable
class="parameter">timeout</replaceable></option></term>
+       <listitem>
+        <para>
+         Do not wait forever to acquire shared table locks at the
beginning of
+         the dump. Instead fail if unable to lock a table within the
specified
+         <replaceable class="parameter">timeout</>. The timeout may be
+         specified in any of the formats accepted by <command>SET
+         statement_timeout</>.  (Allowed values vary depending on the
server
+         version you are dumping from, but an integer number of
milliseconds
+         is accepted by all versions since 7.3.  This option is ignored
when
+         dumping from a pre-7.3 server.)
+        </para>
+       </listitem>
+      </varlistentry>
+ 
+      <varlistentry>
        <term><option>--no-tablespaces</option></term>
        <listitem>
         <para>
*** a/src/bin/pg_dump/pg_dumpall.c
--- b/src/bin/pg_dump/pg_dumpall.c
***************
*** 120,125 **** main(int argc, char *argv[])
--- 120,126 ----
  		{"disable-triggers", no_argument, &disable_triggers, 1},
  		{"no-tablespaces", no_argument, &no_tablespaces, 1},
  		{"use-set-session-authorization", no_argument, &use_setsessauth, 1},
+ 		{"lock-wait-timeout", required_argument, NULL, 2},
  
  		{NULL, 0, NULL, 0}
  	};
***************
*** 305,310 **** main(int argc, char *argv[])
--- 306,316 ----
  			case 0:
  				break;
  
+ 			case 2:
+ 				appendPQExpBuffer(pgdumpopts, " --lock-wait-timeout=");
+ 				appendPQExpBuffer(pgdumpopts, optarg);
+                 break;
+ 
  			default:
  				fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
progname);
  				exit(1);
***************
*** 488,493 **** help(void)
--- 494,500 ----
  	printf(_("  -f, --file=FILENAME      output file name\n"));
  	printf(_("  --help                   show this help, then exit\n"));
  	printf(_("  --version                output version information, then
exit\n"));
+ 	printf(_("  --lock-wait-timeout=TIMEOUT fail after waiting TIMEOUT for
a table lock\n"));
  	printf(_("\nOptions controlling the output content:\n"));
  	printf(_("  -a, --data-only          dump only the data, not the
schema\n"));
  	printf(_("  -c, --clean              clean (drop) databases prior to
create\n"));

--d6Gm4EdcadzBjdND
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


-- 
Sent via pgsql-patches mailing list (pgsql-patches@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches

--d6Gm4EdcadzBjdND--
 




 12 Posts in Topic:
pg_dump lock timeout
daveg@[EMAIL PROTECTED]   2008-05-11 04:30:47 
Re: pg_dump lock timeout
daveg@[EMAIL PROTECTED]   2008-05-11 06:00:35 
Re: pg_dump lock timeout
david@[EMAIL PROTECTED]   2008-07-02 08:56:26 
Re: pg_dump lock timeout
daveg@[EMAIL PROTECTED]   2008-07-16 19:44:07 
Re: pg_dump lock timeout
tgl@[EMAIL PROTECTED] (T  2008-07-20 14:50:50 
Re: pg_dump lock timeout
daveg@[EMAIL PROTECTED]   2008-07-21 00:21:31 
Re: pg_dump lock timeout
tgl@[EMAIL PROTECTED] (T  2008-07-21 03:43:11 
Re: pg_dump lock timeout
daveg@[EMAIL PROTECTED]   2008-07-21 22:57:35 
Re: pg_dump lock timeout
markokr@[EMAIL PROTECTED]  2008-07-03 11:15:10 
Re: pg_dump lock timeout
daveg@[EMAIL PROTECTED]   2008-07-03 05:55:01 
Re: pg_dump lock timeout
tgl@[EMAIL PROTECTED] (T  2008-07-03 11:33:16 
Re: pg_dump lock timeout
daveg@[EMAIL PROTECTED]   2008-07-16 05:37:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 14:23:30 CDT 2008.