pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Demetres Pantermalis <dpant@intracom.gr>
To: pgsql-interfaces@postgresql.org
Subject: Possible bug in ECPGlib thread-safety (Postgres 7.4)...
Date: Thu, 4 Dec 2003 13:43:24 +0200
Message-ID: <NDBBLJPIEGAHHANHMMBBOENADBAA.dpant@intracom.gr> (raw)

Dear All,

trying to run some tests for the thread-safety of the ecpg library, I
modified the test_thread.pgc to be like the one attached (test_thread1.pgc).

The changes are as follows:
1) All the connections used for insertions, begin in main function (and not
inside each thread)
2) The statement "EXEC SQL SET CONNECTION <conn> followed by the inserts is
used, instead of the"EXEC SQL AT <conn> ..." statement.
3) A new line for ECPGlog was added.

The results of executing the code are unexpected. Either a core dump
results, or one of the two threads inserts the rows in the table and the
process never returns to OS prompt, while the other thread seems to insert
the rows, but never commits.

A log file produced by ECPGlog is also attached.

Platforms tested: SunOS 5.8 and Linux RH9 (with the same results)

Any suggestions appreciated.

PS. I've found out that somebody else had about the same problem, but that
was during testing phase and I assumed that it could have been solved by
now. The links found are:
http://archives.postgresql.org/pgsql-hackers/2003-06/msg00513.php
http://archives.postgresql.org/pgsql-hackers/2003-06/msg00792.php

Demetres Pantermalis
Intracom SA
Network Support Systems.

Attachments:

  [application/x-gzip] thr_sfty.tar.gz (1.3K, ../NDBBLJPIEGAHHANHMMBBOENADBAA.dpant@intracom.gr/2-thr_sfty.tar.gz)
  download

view thread (15+ messages)  latest in thread

Message-ID: <NDBBLJPIEGAHHANHMMBBOENADBAA.dpant@intracom.gr>
Permalink:  ../NDBBLJPIEGAHHANHMMBBOENADBAA.dpant@intracom.gr/
Also on:    postgresql.org/message-id/NDBBLJPIEGAHHANHMMBBOENADBAA.dpant@intracom.gr

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: dpant@intracom.gr
  Subject: Re: Possible bug in ECPGlib thread-safety (Postgres 7.4)...
  In-Reply-To: <NDBBLJPIEGAHHANHMMBBOENADBAA.dpant@intracom.gr>

* 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