By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,777 Members | 1,755 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,777 IT Pros & Developers. It's quick & easy.

Postgres 7.4 : ECPG not Thread-safe

P: n/a
Hi,

This is the wrong mailing list but I don't sent it to pgsql-bugs with
success.


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Thu, Oct 09, 2003 at 04:42:18PM +0200, Thierry Missimilly wrote:
I don't know if it is really link to Postgres and ECPG but if you
modifiy pgbch.pgc in the way that the
transaction is limited to "BEGIN; END; ", it will never hang.
Do you mean it only hangs if you do automatic transaction starting? I
mean if you use PGSQL implicit transactions and explicit BEGIN...END
blocks it works well, but if you let libecpg start the transaction and
just do a COMMIT every once in a while it is not?
Well, i'm not an expert in Linux multi-thread, but it seems the thread


Neither am I, so I have no idea where to look.

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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #2

P: n/a

I am going to see if I can reproduce the hang.

---------------------------------------------------------------------------

Michael Meskes wrote:
On Thu, Oct 09, 2003 at 04:42:18PM +0200, Thierry Missimilly wrote:
I don't know if it is really link to Postgres and ECPG but if you
modifiy pgbch.pgc in the way that the
transaction is limited to "BEGIN; END; ", it will never hang.


Do you mean it only hangs if you do automatic transaction starting? I
mean if you use PGSQL implicit transactions and explicit BEGIN...END
blocks it works well, but if you let libecpg start the transaction and
just do a COMMIT every once in a while it is not?
Well, i'm not an expert in Linux multi-thread, but it seems the thread


Neither am I, so I have no idea where to look.

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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


--
Bruce Momjian | http://candle.pha.pa.us
pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #3

P: n/a


Michael Meskes wrote:
On Thu, Oct 09, 2003 at 04:42:18PM +0200, Thierry Missimilly wrote:
I don't know if it is really link to Postgres and ECPG but if you
modifiy pgbch.pgc in the way that the
transaction is limited to "BEGIN; END; ", it will never hang.
Do you mean it only hangs if you do automatic transaction starting? I
mean if you use PGSQL implicit transactions and explicit BEGIN...END
blocks it works well, but if you let libecpg start the transaction and
just do a COMMIT every once in a while it is not?


Well, i'm wrong.
A pgbch (pgbench) transcation limited to :
BEGIN;
END;
Will hang too (with the same gdb stack trace), but i need to increase the
number of client to see it.

But, when the doOne() function is just doing :
for (j = 0; j < 1000000; j++) { }
pgbch never hang.
In that case, except doConnect() the lib ecpg is not used at all by the
threads.

Well, i'm not an expert in Linux multi-thread, but it seems the thread


Neither am I, so I have no idea where to look.

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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #4

P: n/a
Thierry Missimilly wrote:
Please enter a FULL description of your problem:
------------------------------------------------
I think i have a Thread-safe problem. PostgreSQL developpers will find a
test program to reproduce it on their lab.

I have, already sent this to pgsql-general and pgsql-hacker, but get
back not answers. But neve mind.

I've built Postgresql with the option --enable-thread-safety --with-tcl.

And now run a pgbench like program call pgbch.pgc (attached with this
mail).

The main differences of pgbch.pgc are :
1) Pro*c code
2) Multi-threaded
3) Some specific code for Oracle
4) Some specific dynamic trace for debug


I have worked with this user and found they were using EXEC SQL from
different threads, but were not using the "AT" clause to force the
threads to use their own private connection, so there was no threading
bug in our code.

--
Bruce Momjian | http://candle.pha.pa.us
pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.