pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Pavel Holec <holec@email.cz>
Cc: 'Craig Ringer' <ringerc@ringerc.id.au>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6233: pg_dump hangs with Access Violation C0000005
Date: Wed, 05 Oct 2011 00:06:50 -0400
Message-ID: <9004.1317787610@sss.pgh.pa.us> (raw)
In-Reply-To: <1317784584-sup-6771@alvh.no-ip.org>
References: <201109282118.p8SLIwYx099581@wwwmaster.postgresql.org>
	<4E8422B0.5060404@ringerc.id.au>
	<!&!AAAAAAAAAAAYAAAAAAAAAE8q5Jcv4mJImRanr8cGRrPCgAAAEAAAAKoxZCnfy11Bjcdjb1Sap84BAAAAAA==@email.cz>
	<4E8A72E3.9080701@ringerc.id.au>
	<!&!AAAAAAAAAAAYAAAAAAAAAE8q5Jcv4mJImRanr8cGRrPCgAAAEAAAAEOddjeKN+JAi/9rqv7Z5K0BAAAAAA==@email.cz>
	<6027.1317776669@sss.pgh.pa.us>
	<1317784584-sup-6771@alvh.no-ip.org>

Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Tom Lane's message of mar oct 04 22:04:29 -0300 2011:
>> Hmm.  I can see how that would happen if you're using one of the Windows
>> environments wherein malloc's done inside libpq have to be free'd inside
>> libpq.  (The PQExpBuffer support code is in libpq...)

> Isn't this the kind of thing that you have to enable explicitly? 

I'm looking at our docs for PQfreemem:

	Frees memory allocated by libpq, particularly PQescapeByteaConn,
	PQescapeBytea, PQunescapeBytea, and PQnotifies. It is
	particularly important that this function, rather than free(),
	be used on Microsoft Windows. This is because allocating memory
	in a DLL and releasing it in the application works only if
	multithreaded/single-threaded, release/debug, and static/dynamic
	flags are the same for the DLL and the application. On
	non-Microsoft Windows platforms, this function is the same as
	the standard library function free().

I have no idea how accurate or complete that third sentence is;
but perhaps the OP is trying to use a libpq.dll that was built
separately from his pg_dump executable?

			regards, tom lane



view thread (15+ messages)  latest in thread

Message-ID: <9004.1317787610@sss.pgh.pa.us>
Permalink:  ../9004.1317787610@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9004.1317787610@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, holec@email.cz, ringerc@ringerc.id.au
  Subject: Re: BUG #6233: pg_dump hangs with Access Violation C0000005
  In-Reply-To: <9004.1317787610@sss.pgh.pa.us>
  References: <201109282118.p8SLIwYx099581@wwwmaster.postgresql.org> <4E8422B0.5060404@ringerc.id.au> <!&!AAAAAAAAAAAYAAAAAAAAAE8q5Jcv4mJImRanr8cGRrPCgAAAEAAAAKoxZCnfy11Bjcdjb1Sap84BAAAAAA==@email.cz> <4E8A72E3.9080701@ringerc.id.au> <!&!AAAAAAAAAAAYAAAAAAAAAE8q5Jcv4mJImRanr8cGRrPCgAAAEAAAAEOddjeKN+JAi/9rqv7Z5K0BAAAAAA==@email.cz> <6027.1317776669@sss.pgh.pa.us> <1317784584-sup-6771@alvh.no-ip.org> <9004.1317787610@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox