upgrade from 8.0.3 to 8.1.10 crash

Started by Boergesson, Cherylabout 18 years ago8 messages
#1Boergesson, Cheryl
Cheryl.Boergesson@gdit.com

Hello. I am trying to upgrade from PostgreSQL 8.0.3 to PostgreSQL
8.1.10. I'm on WindowsXP and I'm compiling with Visual C++ 6.0.

I have a very simple routine that works fine with the 8.0.3 version:

int easy_connect()

{

exec sql connect to my_db as my_cnxtn;

printf ("connection results:\n");

printf ("code: %d\n", sqlca.sqlcode);

printf ("state: %s\n", sqlca.sqlstate);

printf ("warn: %s\n", sqlca.sqlwarn);

exec sql begin work;

exec sql commit work;

return 0;

}

When I use the 8.1.10 version, the connection works ( sqlca.sqlcode is
0, sqlca.sqlstate is 0000 and sqlca.sqlwarn is blank). But it then
crashes on the "exec sql begin work" line.

I get the following error in a window:

Runtime Error!

Program: C:\testSQL.exe

This application has requested the Runtime to terminate it in an unusual
way.

Please contact the application's support team for more information.

I removed the 8.0.3 version using "remove program" from the control
panel. I then went and removed my C:\Program Files\PostgreSQL\8.0
folder, just to make sure I was not including the wrong header files,
linking to the wrong libraries, or calling the wrong version of
ecpg.exe.

Thanks for any help.

-Cheryl

#2Boergesson, Cheryl
Cheryl.Boergesson@gdit.com
In reply to: Boergesson, Cheryl (#1)
Re: upgrade from 8.0.3 to 8.1.10 crash

I found when I removed all comments, it worked fine. Any ideas?

________________________________

From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Boergesson,
Cheryl
Sent: Thursday, October 18, 2007 9:24 AM
To: pgsql-hackers@postgresql.org
Subject: [HACKERS] upgrade from 8.0.3 to 8.1.10 crash

Hello. I am trying to upgrade from PostgreSQL 8.0.3 to PostgreSQL
8.1.10. I'm on WindowsXP and I'm compiling with Visual C++ 6.0.

I have a very simple routine that works fine with the 8.0.3 version:

int easy_connect()

{

exec sql connect to my_db as my_cnxtn;

printf ("connection results:\n");

printf ("code: %d\n", sqlca.sqlcode);

printf ("state: %s\n", sqlca.sqlstate);

printf ("warn: %s\n", sqlca.sqlwarn);

exec sql begin work;

exec sql commit work;

return 0;

}

When I use the 8.1.10 version, the connection works ( sqlca.sqlcode is
0, sqlca.sqlstate is 0000 and sqlca.sqlwarn is blank). But it then
crashes on the "exec sql begin work" line.

I get the following error in a window:

Runtime Error!

Program: C:\testSQL.exe

This application has requested the Runtime to terminate it in an unusual
way.

Please contact the application's support team for more information.

I removed the 8.0.3 version using "remove program" from the control
panel. I then went and removed my C:\Program Files\PostgreSQL\8.0
folder, just to make sure I was not including the wrong header files,
linking to the wrong libraries, or calling the wrong version of
ecpg.exe.

Thanks for any help.

-Cheryl

#3Alvaro Herrera
alvherre@commandprompt.com
In reply to: Boergesson, Cheryl (#2)
Re: upgrade from 8.0.3 to 8.1.10 crash

Boergesson, Cheryl wrote:

I found when I removed all comments, it worked fine. Any ideas?

I suggest you add "ECPG" to the subject line so that the relevant
developers notice your problem.

--
Alvaro Herrera http://www.amazon.com/gp/registry/CTMLCN8V17R4
"The Postgresql hackers have what I call a "NASA space shot" mentality.
Quite refreshing in a world of "weekend drag racer" developers."
(Scott Marlowe)

#4Boergesson, Cheryl
Cheryl.Boergesson@gdit.com
In reply to: Boergesson, Cheryl (#1)
ECPG crash - upgrade from 8.0.3 to 8.1.10

Hello. I am trying to upgrade from PostgreSQL 8.0.3 to PostgreSQL
8.1.10. I'm on WindowsXP and I'm compiling with Visual C++ 6.0.

I have a very simple routine that works fine with the 8.0.3 version:

int easy_connect()

{

exec sql connect to my_db as my_cnxtn;

printf ("connection results:\n");

printf ("code: %d\n", sqlca.sqlcode);

printf ("state: %s\n", sqlca.sqlstate);

printf ("warn: %s\n", sqlca.sqlwarn);

exec sql begin work;

exec sql commit work;

return 0;

}

When I use the 8.1.10 version, the connection works ( sqlca.sqlcode is
0, sqlca.sqlstate is 0000 and sqlca.sqlwarn is blank). But it then
crashes on the "exec sql begin work" line.

I get the following error in a window:

Runtime Error!

Program: C:\testSQL.exe

This application has requested the Runtime to terminate it in an unusual
way.

Please contact the application's support team for more information.

I removed the 8.0.3 version using "remove program" from the control
panel. I then went and removed my C:\Program Files\PostgreSQL\8.0
folder, just to make sure I was not including the wrong header files,
linking to the wrong libraries, or calling the wrong version of
ecpg.exe.

Oddly, when I removed all comments, it worked fine.

Thanks for any help.

-Cheryl

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Boergesson, Cheryl (#2)
Re: upgrade from 8.0.3 to 8.1.10 crash

"Boergesson, Cheryl" <Cheryl.Boergesson@gdit.com> writes:

I found when I removed all comments, it worked fine. Any ideas?

Oh? Considering that the fragments you've shown us have never had
one single comment, that means that no one could possibly have offered
you any useful advice.

Please, if you would like help with this sort of problem, show a complete
self-contained test case. Leaving stuff out is counterproductive, way
too often.

regards, tom lane

#6Michael Meskes
meskes@postgresql.org
In reply to: Boergesson, Cheryl (#4)
Re: ECPG crash - upgrade from 8.0.3 to 8.1.10

On Thu, Oct 18, 2007 at 03:36:34PM -0400, Boergesson, Cheryl wrote:

Hello. I am trying to upgrade from PostgreSQL 8.0.3 to PostgreSQL
8.1.10. I'm on WindowsXP and I'm compiling with Visual C++ 6.0.
...
Oddly, when I removed all comments, it worked fine.

Which comments?

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

#7Boergesson, Cheryl
Cheryl.Boergesson@gdit.com
In reply to: Boergesson, Cheryl (#1)
Re: ECPG crash - upgrade from 8.0.3 to 8.1.10

The program below works with PostgreSQL 8.0.3, but not 8.1.10. The
error I receive is:

Runtime Error!

Program: C:\testSQL.exe

This application has requested the Runtime to terminate it in an unusual
way.

Please contact the application's support team for more information.

This happens on the "exec sql commit work" line. If I remove the
comments, it works with both 8.0.3 and 8.1.10. If I change the comments
(add a line, delete a line, etc.) it continues to crash, but sometimes
it will crash on the "exec sql begin work" line. The connection works
fine -sqlca.sqlcode is 0, sqlca.sqlstate is 0000 and sqlca.sqlwarn is
blank

I am running on WindowsXP and compiling with Visual C++ 6.0.

I ran ecpg versions 8.0.3 and 8.1.10 on the file, then compared the
created .c files. According to KDiff, the files are identical, except
for the first comment line saying which version of ecpg was used.

Here's the testSQL.pgc code:

/* add a comment */

/* and another */

/* one more */

main (int argc, char **argv)

{

printf ("connect\n");

exec sql connect to mdllt_db as mdllt_cnxtn;

printf ("connection results:\n");

printf ("code: %d\n", sqlca.sqlcode);

printf ("state: %s\n", sqlca.sqlstate);

printf ("warn: %s\n", sqlca.sqlwarn);

exec sql begin work;

printf ("begin results:\n");

printf ("code: %d\n", sqlca.sqlcode);

printf ("state: %s\n", sqlca.sqlstate);

printf ("warn: %s\n", sqlca.sqlwarn);

exec sql commit work;

printf ("end\n");

return 0;

}

Thanks for any help.

-Cheryl

#8Michael Meskes
meskes@postgresql.org
In reply to: Boergesson, Cheryl (#7)
Re: ECPG crash - upgrade from 8.0.3 to 8.1.10

On Mon, Oct 22, 2007 at 10:07:03AM -0400, Boergesson, Cheryl wrote:

The program below works with PostgreSQL 8.0.3, but not 8.1.10. The
error I receive is:
...

Is there a way for you to compile and run the program without threading?
Or try with CVS head instead of 8.1.10?

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!