Re: Waiting for Commit - Mailing list pgsql-general

From Pablo Montilla
Subject Re: Waiting for Commit
Date
Msg-id 000201c4145e$c1fbc300$601d28c8@athena
Whole thread Raw
In response to Waiting for Commit  ("Pablo Montilla" <melkor@adinet.com.uy>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for your response, I've been doing some tests, and got to a
point where I can put a case for consideration.

This is going get a bit more specific, so if this gets off topic,
please bear with me.

I'm programming in C# using the Npgsql driver (don't think its the
offending code, as i've traced all the code, and the commands are
going sequentially to the database).

This is a test case that fails:

01.database.connect();
02.database.execute("DELETE FROM test");
03.for(int i = 0; i < 30; i++) {
04.    database.beginTransaction();
05.    database.execute("INSERT INTO test VALUES(1, 'test')");
06.    database.commitTransaction();
07.}
08.IDataReader
09.reader = database.executeReader("SELECT * FROM test");
10.for(int i = 0; i < 30; i++) {
11.    assert(reader.Read());
12.}
13.database.disconnect();

The last part of the test, fails in the iteration 26. If I move the
transactions from lines 04 and 06 outside the loop, I don't see the
error.

Each reader, is created using another connection (the connection is
created automatically).

Any ideas? What I'm doing wrong?

Thanks,
Pablo
- --
I have never been able to understand why it is that just because
I am unintelligible nobody can understand me.
 -- Milton Mayer


-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQGYfK76KEogX0AkqEQID+wCfWY0vb6yR69tFXnysfNv0gbkynhAAn3Jj
NIl1qXlXTDsz1NFlhrQ+4ri6
=6FYu
-----END PGP SIGNATURE-----


pgsql-general by date:

Previous
From: Terry Lee Tucker
Date:
Subject: Re: Passing a row
Next
From: "Pablo Montilla"
Date:
Subject: Re: Waiting for Commit