Re: [GENERAL] possible ecpg compatibility problem

2011-08-02 Thread Boszormenyi Zoltan
Hi,

2011-08-01 16:11 keltezéssel, Paul Tilles írta:
 I have an executable which uses ecpg which was created on a system using 
 postgres
 version 8.2.6.  I sent it to a site with version 8.4.7 installed.  The 
 executable fails
 with a memory fault.

 Is there a problem doing this?

Try recompiling your ecpg code with 8.4.x's ecpg and use that.
At least the public ECPGdo() interface have changed between
8.2 and 8.4, so your old binary compiled with 8.2 obviously fails.
I wonder why the runtime linker didn't complain, the major
SO version has also changed between these two versions.

Best regards,
Zoltán Böszörményi

-- 
--
Zoltán Böszörményi
Cybertec Schönig  Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de
 http://www.postgresql.at/


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] possible ecpg compatibility problem

2011-08-01 Thread Craig Ringer

On 1/08/2011 10:11 PM, Paul Tilles wrote:

I have an executable which uses ecpg which was created on a system using
postgres version 8.2.6. I sent it to a site with version 8.4.7
installed. The executable fails with a memory fault.

Is there a problem doing this?


With the amount of information you've given, it's impossible to know.

Start by obtaining a backtrace of your program's crash obtained using a 
build of libpq and ecpg that has debug symbols enabled. This might tell 
you what's wrong immediately, and if it doesn't it'll give you a clue 
about where to start looking.


I also suggest doing a valgrind run on both the original 8.2.6 and the 
new 8.4.7 versions. See if you have memory problems in the old version 
that you were getting away with before.


Next, once you know where it crashed, try to produce a cut-down version 
of the program that still works on 8.2 and crashes on 8.4 . Most likely 
you will discover the problem while you work on this. If the cut-down 
version clearly shows an error in ecpg, send the source code, 
makefile/whatever, and any .SQL required to for a test run to the 
pgsql-bugs list . If you can't make it public you could possibly ask 
anyone interested in the bug to contact you off-list instead of 
attaching/linking to the test case.


--
Craig Ringer

POST Newspapers
276 Onslow Rd, Shenton Park
Ph: 08 9381 3088 Fax: 08 9388 2258
ABN: 50 008 917 717
http://www.postnewspapers.com.au/

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general