Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id EE0F2B5DBC8 for ; Wed, 5 Oct 2011 21:12:38 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 40397-01 for ; Thu, 6 Oct 2011 00:12:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail-yx0-f174.google.com (mail-yx0-f174.google.com [209.85.213.174]) by mail.postgresql.org (Postfix) with ESMTP id 65208B5DC3C for ; Wed, 5 Oct 2011 21:12:31 -0300 (ADT) Received: by yxl31 with SMTP id 31so2112232yxl.19 for ; Wed, 05 Oct 2011 17:12:31 -0700 (PDT) Received: by 10.236.177.72 with SMTP id c48mr252546yhm.79.1317859524507; Wed, 05 Oct 2011 17:05:24 -0700 (PDT) Received: from ayaki.localdomain ([119.11.19.128]) by mx.google.com with ESMTPS id s77sm4843620yhe.22.2011.10.05.17.05.19 (version=SSLv3 cipher=OTHER); Wed, 05 Oct 2011 17:05:23 -0700 (PDT) Message-ID: <4E8CF0BB.8040605@ringerc.id.au> Date: Thu, 06 Oct 2011 08:05:15 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: Pavel Holec CC: 'Tom Lane' , 'Alvaro Herrera' , 'Pg Bugs' Subject: Re: BUG #6233: pg_dump hangs with Access Violation C0000005 References: <201109282118.p8SLIwYx099581@wwwmaster.postgresql.org> <4E8422B0.5060404@ringerc.id.au> <4E8A72E3.9080701@ringerc.id.au> <6027.1317776669@sss.pgh.pa.us> <1317784584-sup-6771@alvh.no-ip.org> <9004.1317787610@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/53 X-Sequence-Number: 31323 On 10/05/2011 09:37 PM, Pavel Holec wrote: > Yes, this is the problem. libpq.dll I have built in VC6. With original I had > problem with msvcr80.dll and WinSxS because my end client app is also from > VC6 and I can't prepare redist msvcr for end user. Can you advice me how to > do it? It would've been nice if you'd mentioned that ;-) Running a msvcrt.dll libpq with a msvcr80.dll pg_dump should work, though; Windows programs are expected to cope with insane things like mixing multiple C runtimes. It sounds like there's a bug where pg_dump doesn't use the libpq memory management functions and instead does a direct free(); changing those crash sites you found to use PQfreemem should solve the problem. Try it and see. Advise you how to do what? By the way, you should be able to use a regular libpq compiled against msvcr80.dll with your VC6 client app so long as the client app uses PQfreemem to release memory allocated by libpq. -- Craig Ringer