From: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk> |
---|---|
To: | Philip Yarra <philip(at)utiba(dot)com> |
Cc: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, pgsql-interfaces(at)postgresql(dot)org |
Subject: | ECPG still having thread problems on Linux |
Date: | 2003-06-25 09:35:40 |
Message-ID: | 16121.27884.841077.431930@kelvin.csl.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-interfaces |
Philip, both your SELECTs are using the same database connection (and
it's undefined which one it is) without any locking. You need to add
"AT clauses" to specify an explicit connection. See attached diff.
However, i've not tried it... I'll try and get some time!
L.
Philip Yarra writes:
> Hi all, it looks like Lee's ECPG (and libpq) thread-safety patches
> have been applied, and configure --with-threads is also added. I
> have been doing some testing.
>
> On FreeBSD 4.8, the attached sample app runs without a problem.
>
> However, I still encounter a threading problem on Linux (RedHat 7.3).
>
> I have done the following:
> 1) cvs update
> 2) ./configure --with-threads && make && su -c "make install"
> 3) compiled cn.pgc as follows:
> a) ecpg -t cn.pgc
> b) gcc -I/usr/local/pgsql/include -L/usr/local/pgsql/lib \
> -lecpg -lpgtypes -pthread cn.c
> 4) ./a.out - one thread runs to completion (inserts 5 records),
> the other hangs (manages one insert, then blocks forever)
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 1.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kaare Rasmussen | 2003-06-25 10:54:02 | Re: Two weeks to feature freeze |
Previous Message | Shridhar Daithankar | 2003-06-25 09:29:36 | Re: [GENERAL] Physical Database Configuration |
From | Date | Subject | |
---|---|---|---|
Next Message | Nicolás Alvarez | 2003-06-25 20:31:50 | postgresql on sco openserver |
Previous Message | The Hermit Hacker | 2003-06-25 02:46:24 | libpgtcl and pgtclsh |