Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 032CC9FC14D for ; Fri, 13 Jul 2007 11:02:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 16447-08 for ; Fri, 13 Jul 2007 11:02:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mir3-fs.mir3.com (mail.mir3.com [65.208.188.100]) by postgresql.org (Postfix) with ESMTP id E19E09FC13E for ; Fri, 13 Jul 2007 11:02:40 -0300 (ADT) Received: MIR3-FS.mir3.com 172.16.1.11 from 172.16.2.68 172.16.2.68 via HTTP with MS-WebStorage 6.0.6249 Received: from archimedes by MIR3-FS.mir3.com; 13 Jul 2007 07:02:34 -0700 Subject: Re: backup through Java From: Mark Lewis To: Michael Schmidt Cc: PostgreSQL JDBC In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: MIR3, Inc. Date: Fri, 13 Jul 2007 07:02:33 -0700 Message-Id: <1184335353.387.271.camel@archimedes> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/51 X-Sequence-Number: 17225 When it doesn't work, how does it not work? If you see pg-dump.exe is still running but not doing anything, then it might be because it generated more output to stdout than will fit in the buffer, and you're not reading it. One common mistake is to forget to read stdout/stderr from the process. -- Mark On Thu, 2007-07-12 at 18:01 -0600, Michael Schmidt wrote: > Folks, > I know this isn't technically a JDBC question because backup isn't > done through JDBC, but I thought this is where the Java experts would > be. > > I've got a Java application developed in Eclipse interfacing a > PostgreSQL 8.2.1 database. The user can do a backup using pg-dump.exe > - the Java code invokes this as an external process in a thread (Jobs > interface, in Eclipse parlance). This works some of the time - but > not always. Since it works sometimes, I think the Java code that > invokes pg_dump.exe is basically OK, but since it hangs at other > times, there is obviously something bad going on. I don't know where > to start looking for problems. I was wondering if anyone had seen > similar behavior (Java is usually pretty predictable in my experience) > or had some thoughts on where the problem could lie so I could at > least begin debugging my app. > > Thanks! > Michael Schmidt