Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UDHco-0001kV-1c for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Mar 2013 16:55:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UDHcn-0005CM-HJ for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Mar 2013 16:55:29 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UD5Wi-0001NC-E3 for pgsql-bugs@postgresql.org; Wed, 06 Mar 2013 04:00:24 +0000 Received: from tbt-26-028.beingcorp.co.jp ([211.8.42.156] helo=24a021.beingcorp.co.jp) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UD5We-0003OF-SP for pgsql-bugs@postgresql.org; Wed, 06 Mar 2013 04:00:22 +0000 Received: from 25a038note (p11038-ipngnfx01sasajima.aichi.ocn.ne.jp [114.179.105.38]) by 24a021.beingcorp.co.jp (MOS 3.10.10a-GA) with SMTP id BRI58898; Wed, 6 Mar 2013 13:00:08 +0900 (JST) Message-ID: From: "Shin-ichi MORITA" To: "Tom Lane" Cc: References: <17113.1362429434@sss.pgh.pa.us> <2528D0D4784443EB95A0752179B0C0CE@25a038note> <13236.1362511346@sss.pgh.pa.us> In-Reply-To: <13236.1362511346@sss.pgh.pa.us> Subject: Re: BUG #7914: pg_dump aborts occasionally Date: Wed, 6 Mar 2013 12:59:27 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-2022-jp"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6002.18197 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18463 X-Pg-Spam-Score: -2.1 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org >>> Hm. Can you create a reproducible test case for this? >> I think this issue happens when pg_dump is slower than the backend >> for some reason. > > If so, perhaps injecting a sleep() delay into the right place in pg_dump > or libpq would make it reproducible? I wouldn't have any problem > crediting a test with such modified code as being a valid test. I think it's a good idea. Although I can not confirm this by actually modifying the code right now, somewhere in the loop calling PQgetCopyData() in pg_dump.c would be good. pg_dump.c: 1348: for (;;) 1349: { 1350: ret = PQgetCopyData(conn, ©buf, 0); 1351: 1352: if (ret < 0) 1353: break; /* done or error */ 1354: 1355: if (copybuf) 1356: { 1357: WriteData(fout, copybuf, ret); 1358: PQfreemem(copybuf); 1359: } sleep(1); /* maybe */ An alternative way would be running pg_dump with a lower priority. Actually, I can reproduce this issue by setting the priority of pg_dump to Low using Windows Task Manager on the "single processor" environment. Regards, Shin-ichi MORITA -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs